Some notes on how to set up your
Do not put
sbt-launch.jar in your
$SCALA_HOME/lib directory, your
lib directory, or anywhere it will be put on a classpath. It
isn’t a library.
The character encoding used by your terminal may differ from Java’s
default encoding for your platform. In this case, you will need to add
-Dfile.encoding=<encoding> in your
sbt script to set the
encoding, which might look like:
If you find yourself running out of permgen space or your workstation is low on memory, adjust the JVM configuration as you would for any application. For example a common set of memory-related options is:
java -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled
sbt-launch.jar is just a bootstrap; the actual meat of sbt, and the
Scala compiler and standard library, are downloaded to the shared
To change the location of this directory, set the
system property in your
sbt script. A relative path will be resolved
against the current working directory, which can be useful if you want
to avoid sharing the boot directory between projects. For example, the
following uses the pre-0.11 style of putting the boot directory in
On Unix, sbt will pick up any HTTP, HTTPS, or FTP proxy settings from
variables. If you are behind a proxy requiring authentication, your
sbt script must also pass flags to set the
http.proxyPassword properties for HTTP,
ftp.proxyPassword properties for FTP, or
https.proxyPassword properties for HTTPS.
java -Dhttp.proxyUser=username -Dhttp.proxyPassword=mypassword
On Windows, your script should set properties for proxy host, port, and if applicable, username and password. For example, for HTTP:
java -Dhttp.proxyHost=myproxy -Dhttp.proxyPort=8080 -Dhttp.proxyUser=username -Dhttp.proxyPassword=mypassword
ftp in the above command line to
configure HTTPS or FTP.
If you have files on your system that have non-ascii characters in them on a
posix system, e.g. Linux or macOS, it may be necessary to set the
environment variable. If this environment variable is not set to a UTF-8
compatible locale, e.g.
LC_TYPE=en_US.UTF-8, then sbt may crash with a
java.nio.file.InvalidPathException. To see a list of available locales, run
locale -a. For more information about locales, see
International Language Environments Guide.