OnWorks favicon

fsc - Online in the Cloud

Run fsc in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command fsc that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator



fsc - Fast offline compiler for the Scala 2 language


fsc [ <options> ] <source files>


Command line options. See OPTIONS below.

<source files>
One or more source files to be compiled (such as MyClass.scala).


The offline compiler supports all options of scalac plus the following:

-reset Reset compile server caches.

Shut down the compilation daemon. The daemon attempts to restart itself as
necessary, but sometimes an explicit shutdown is required. A common example is if
jars on the class path have changed.

-server <hostname:portnumber>
Specify compile server host at port number. Usually this option is not needed.
Note that the hostname must be for a host that shares the same filesystem.

Pass <flag> directly to the Java VM for the compilation daemon.


The fsc tool submits Scala compilation jobs to a compilation daemon. The first time it is
executed, the daemon is started automatically. On subsequent runs, the same daemon can be
reused, thus resulting in a faster compilation. The tool is especially effective when
repeatedly compiling with the same class paths, because the compilation daemon can reuse a
compiler instance.

The compilation daemon is smart enough to flush its cached compiler when the class path
changes. However, if the contents of the class path change, for example due to upgrading
a library, then the daemon should be explicitly shut down with -shutdown.

Note that the scala script runner will also use the offline compiler by default, with the
same advantages and caveats.


The following session shows a typical speed up due to using the offline compiler.

> fsc -verbose -d /tmp test.scala
[Port number: 32834]
[Starting new Scala compile server instance]
[Classpath = ...]
[loaded directory path ... in 692ms]
[parsing test.scala]
[total in 943ms]

> fsc -verbose -d /tmp test.scala
[Port number: 32834]
[parsing test.scala]
[total in 60ms]

> fsc -verbose -d /tmp test.scala
[Port number: 32834]
[parsing test.scala]
[total in 42ms]

> fsc -verbose -shutdown
[Scala compile server exited]


Specify the java command to be used for running the Scala code. Arguments may be
specified as part of the environment variable; spaces, quotation marks, etc., will
be passed directly to the shell for expansion.

Specify JDK/JRE home directory. This directory is used to locate the java command
unless JAVACMD variable set.

Specify the options to be passed to the java command defined by JAVACMD.

With Java 1.5 (or newer) one may for example configure the memory usage of the JVM
as follows: JAVA_OPTS="-Xmx512M -Xms16M -Xss16M"

With GNU Java one may configure the memory usage of the GIJ as follows:
JAVA_OPTS="--mx512m --ms16m"


fsc returns a zero exit status if it succeeds to compile the specified input files. Non
zero is returned in case of failure.

Use fsc online using onworks.net services

Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Strikr Free Software project. Artifacts
    released under a 'intent based'
    dual license: AGPLv3 (community) and
    CC-BY-NC-ND 4.0 international
    Download strikr
  • 3
    giflib is a library for reading and
    writing gif images. It is API and ABI
    compatible with libungif which was in
    wide use while the LZW compression
    algorithm was...
    Download GIFLIB
  • 4
    Alt-F provides a free and open source
    alternative firmware for the DLINK
    DNS-320/320L/321/323/325/327L and
    DNR-322L. Alt-F has Samba and NFS;
    supports ext2/3/4...
    Download Alt-F
  • 5
    Usm is a unified slackware package
    manager that handles automatic
    dependency resolution. It unifies
    various package repositories including
    slackware, slacky, p...
    Download usm
  • 6
    Chart.js is a Javascript library that
    allows designers and developers to draw
    all kinds of charts using the HTML5
    canvas element. Chart js offers a great
    array ...
    Download Chart.js
  • More »

Linux commands