Install your play framework in directory name without white space:
2. Creating a New Project
To create a new project in Play you need to follow the following steps:
1. Open CMD and go to your play installation directory.
2. Create a new play Project and continue with option and Have fun!
Now, the project is created. Our next task is to make the project available in Intellij IDE.
3. Installing Play Plugin in Intellij
Before we open the project in Intellij, we need to add Play2.0 plugin in Intellij. Notice that, intellij already has Play1.0 plugin.
It can be done from the settings menu under file Menu or from Intellij open dialog.
1. Select Configure and then Select Plugins
2. Click on Install JetBrains Plugin: Select Play 2.0 support and Scala Support and Install
4. Making Project in Intellij
1. Go to your newly created Project Folder in CMD: cd TestPlayProject
2. Type in CMD : play idea
3. Now open the project in Intellij
Now we have our project opened in Intellij.
5. Creating Build Configuration in Intellij
1. Go to Run Menu and Select Edit Configuration and Click on “+” Button
2. Select Play 2 App and name the Build Configuration
6. Creating Build Configuration in Intellij
Now we will add required modules. We can see there is some error in the projects:
Here I will add two example modules, Scala and JPA.
To Add Modules:
1. Go to File Menu and the Project Structure Menu:
2. Click on the “Modules” and Select “+” to add Modules: Scala and Java
For Scala, add Language Level and Compiler Library. For JPA select Hibernate or suitable Provider. Then click apply.
3. Now We can compile the project. For first compile we need to compile the project in CMD. Type: Play Compile
4. Now We can Run the Project without any Error : Type : play run
5. To Test Project Run : go to browser and type url : http://lcoalhost:9000
1. If there is any error in framework, use command : Play clean-all