Skip to content
mrspeaker edited this page Nov 2, 2011 · 34 revisions

Installing Play 2.0 beta

Prerequisites

To run the Play framework, you need JDK 6 or later. If you wish to build Play from source, you will need the Git source control client to fetch the source code.

If you are using MacOS, Java is built-in. If you are using Linux, make sure to use either the Sun JDK or OpenJDK (and not gcj which is the default Java command on many Linux distros). If you are using Windows, just download and install the latest JDK package.

Be sure to have java and javac in the current path (you can check by typing java -version and javac -version at the shell prompt).

Download the binary package

Download the Play 2.0 beta binary package and extract the archive. For convenience, you should add the framework installation directory to your system PATH. If you’re on UNIX, make sure that the play script is runnable (otherwise do a chmod +x play). That’s all.

Check that the play command is available

From a shell, launch the play help command.

$ play help

If everything is properly installed, you should see the basic help:

Building from sources

To benefit from the latest improvements and bug fixes after the initial beta release, you may want to compile Play 2.0 from sources. You’ll need a Git client to fetch the sources.

From the shell, first checkout the Play 2.0 sources:

$ git clone git://github.com/playframework/Play20.git

Then enter into Play20/framework and launch the build script to enter the sbt build console:

$ cd Play20/framework
$ ./build

Once in the sbt console, run build-repository to compile and build everything. This will also create the local ivy repository containing all the required dependencies.

Note that you don't need to install your own sbt version: Play 2.0 embed its own version (currently sbt 0.11.0).

If you want to make changes to the code you can use compile and publish-local to rebuild the framework.

Clone this wiki locally