Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Before creating a play application make sure you have Play framework installed. You can download it here. Note that for now IntelliJ IDEA supports only Play 1.2.4.

This tutorial describes how to get started with Play 1.0 in IntelliJ IDEA. Please download it here before performing this tutorial.

Wiki Markup

1. Create application with play command

The easiest way to create a play application is to use

Wiki Markup
{span:class=id}play new{span}

Code Block
$ play new myFirstApp

This will ask you to enter application name.

2. Generate project

Now you can generate IntelliJ IDEA project for the application with

Wiki Markup
{span:class=id}play idea{span}
command. Run the command from the application directory.

Code Block
$ cd myFirstApp
$ play idea

Project file

Wiki Markup
{span:class=id}My first application.ipr{span}
and module file
Wiki Markup
{span:class=id}My first application.iml{span}
generated now.

3. Open project and module settings


Wiki Markup
{span:class=id}My first application.ipr{span}
file with IntelliJ IDEA and check module's settings in
Wiki Markup
{span:class=shortcut}File  Project Structure{span}
. You will see that the play libraries are attached to the module.

4. Open play console

Once libraries attached to the project, Play support is enabled. Now you can open Play Console by

Wiki Markup
{span:class=shortcut}Tools  Play with Playframework{span}
. Use
Wiki Markup
{span:class=shortcut}Ctrl\+ Shift\+ Space{span}
for commands suggestion.

5. Run application

To run play application in development mode, use run command. You will see the output right in the console.

6. Debug application

In order to debug play application you must create Remote configuration in Run/Debug Configurations by clicking

Wiki Markup
{span:class=shortcut}Run  Edit Configurations{span}