You are viewing the documentation for the 2.9.3 release in the 2.9.x series of releases. The latest stable release series is 3.0.x.

§Creating a New Application

Play expects a specific project structure. If you already have sbt installed, you can use a giter8 template, similar to a Maven archetype, to create a new Play project. This gives you the advantage of setting up your project folders, build structure, and development environment — all with one command.

In a command window, enter the following line to create a new project:

sbt new

In the interactive menu choose:

Then respond to the prompts. After the template creates the project:

  1. Change into the top level project directory.
  2. Enter sbt run to download dependencies and start the system.
  3. In a browser, enter http://localhost:9000/ to view the welcome page.

§Using the Java template directly instead


sbt new playframework/play-java-seed.g8

To create a Play Java 2.9 project:

sbt new playframework/play-java-seed.g8 --branch 2.9.x

§Using the Scala template directly instead


sbt new playframework/play-scala-seed.g8

To create a Play Scala 2.9 project:

sbt new playframework/play-scala-seed.g8 --branch 2.9.x

Besides replacing Akka with Pekko, Play 3.0 is identical to Play 2.9. If you don’t know what Akka or Pekko is, we recommend using Play 3.0. For more details on which version to use, read “How Play Deals with Akka’s License Change”.

Next: Anatomy of a Play application