Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

176 lines (110 sloc) 4.554 kB

Setup

Overview

To create an sbt project, you'll need to take these steps:

Installing sbt

sbt comes pre-built with several available packages for different operating systems.

Here's the available download packages:

Please report any issues to the sbt-launcher-package project.

You may also try out the Manual Installation.

Yum

The sbt package is available from the Typesafe Yum Repository. Please install this rpm to add the typesafe yum repository to your list of approved sources. Then run:

$ yum install sbt

to grab the latest release of sbt.

Note

Please make sure to report any issues you may find to the launcher package project.

Apt

The sbt package is available from the Typesafe Debian Repository. Please install this deb to add the typesafe debian repository to your list of approved sources. Then run:

$ apt-get update
$ apt-get install sbt

to grab the latest typesafe stack release of sbt.

Note

Please make sure to report any issues you may find to the launcher package project.

Gentoo

In official tree there is no ebuild for sbt. But there are ebuilds to merge sbt from binaries: https://github.com/whiter4bbit/overlays/tree/master/dev-java/sbt-bin. To merge sbt from this ebuilds you can do next:

$ mkdir -p /usr/local/portage && cd /usr/local/portage
$ git clone git://github.com/whiter4bbit/overlays.git
$ echo "PORTDIR_OVERLAY=$PORTDIR_OVERLAY /usr/local/portage/overlays" >> /etc/make.conf
$ emerge sbt-bin

Note

Please report any issues with the ebuild here.

Mac

Use either MacPorts:

$ port install sbt

Or HomeBrew:

$ brew install sbt

Note

Please make sure to report any issues with these packages to the relevant maintainers.

Manual Installation

Windows

Create a batch file sbt.bat:

$ set SCRIPT_DIR=%~dp0
$ java -Xmx512M -jar "%SCRIPT_DIR%sbt-launch.jar" %*

and put `sbt-launch.jar`_ in the same directory as the batch file. Put sbt.bat on your path so that you can launch sbt in any directory by typing sbt at the command prompt.

Unix

Download `sbt-launch.jar`_ and place it in ~/bin.

Create a script to run the jar, by placing this in a file called sbt in your ~/bin directory:

$ java -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M -jar `dirname $0`/sbt-launch.jar "$@"

Make the script executable:

$ chmod u+x ~/bin/sbt

Tips and Notes

If you have any trouble running sbt, see :doc:`/Detailed-Topics/Setup-Notes` on terminal encodings, HTTP proxies, and JVM options.

To install sbt, you could also use this fairly elaborated shell script: https://github.com/paulp/sbt-extras (see sbt file in the root dir). It has the same purpose as the simple shell script above but it will install sbt if necessary. It knows all recent versions of sbt and it also comes with a lot of useful command line options.

Next

Move on to :doc:`create a simple project <Hello>`.

Jump to Line
Something went wrong with that request. Please try again.