To run the Play framework, you need JDK 6 or later.
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 the
javac commands in the current path (you can check this by typing
java -version and
javac -version at the shell prompt).
Play is distributed through a tool called Typesafe Activator. Typesafe Activator provides the build tool (sbt) that Play is built on, and also provides many templates and tutorials to help get you started with writing new applications.
Download the latest Activator distribution and extract the archive to a location where you have both read and write access. (Running
activator writes some files to directories within the distribution, so don’t install to
/usr/local or anywhere else you’d need special permission to write to.)
§Add the activator script to your PATH
For convenience, you should add the Activator installation directory to your system
PATH. On UNIX systems, this means doing something like:
On Windows you’ll need to set it in the global environment variables. This means update the
PATH in the environment variables and don’t use a path with spaces.
If you’re on UNIX, make sure that the
activatorscript is executable.
Otherwise do a:
chmod a+x activator
If you’re behind a proxy make sure to define it with
set HTTP_PROXY=http://<host>:<port>on Windows or
export HTTP_PROXY=http://<host>:<port>on UNIX.
§Check that the activator command is available
From a shell, launch the
activator -help command.
$ activator -help
If everything is properly installed, you should see the basic help:
You are now ready to create a new Play application.
Next: Creating a new application
Found an error in this documentation? The source code for this page can be found here. After reading the documentation guidelines, please feel free to contribute a pull request. Have questions or advice to share? Go to our community forums to start a conversation with the community.