This page is no longer maintained — Please continue to the home page at

The Fast Scala Compiler and the OS X Firewall

The Fast Scala Compiler, fsc, is one of the components of the standard Scala distribution. It is equivalent in terms of functionality to the standard Scala compiler, but it keeps the actual compilation module loaded in memory so that subsequent invocations do not need to initialize the compiler again, and are therefore faster.

The communication between the fsc command and the resident compiler takes place by using a network connection. On Macintosh OS X computers, the firewall may interfere with this communication, causing unexpected errors when calling fsc. If you encounter problems of this kind, just follow the guide below, in order to configure the OS X firewall.

OS X Firewall Configuration

It is necessary to use the exception list in order to allow specific programs to pass the firewall. Both the fsc and scala binaries have to be allowed to receive incoming connections. Here's a step-by-step guide:

  1. Open the Finder window containing the Scala binaries. The directory may not be visible in the Finder; in that case, use either one of these two strategies in order to open the window:
    1. Open the Terminal application, then use the 'open' command with the directory holding the Scala binaries, for example:
      $ open /opt/local/share/scala/bin
    2. Alternatively, select from the Finder menu bar 'Finder → Go → Go to Folder...' and type the same path, then click on GO.
  2. Once the Finder window is open, open the firewall system preferences: 'System Preferences → Security → Firewall'
  3. Make sure that 'Set access for specific services and applications' radio button is selected, then press the plus button to open the file selection dialog.
  4. From the Finder window, drag the fsc binary into the file selection dialog of the Firewall preferences and press OK.
  5. Repeat steps 3 and 4 for the scala binary.

This guide was contributed by user "exty".


Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland