How Install the Play Framework and Open new Project with IntelliJ IDE

Lahiru Ariyasinghe
3 min readDec 20, 2020

This story explained about how to download, install and run a Play framework application. Also How create a new project and open with that created project in IntelliJ IDE. As the pre-requests, you need to install java SDK in your PC and IntelliJ IDE also. Please follow the links and download them before the rest of the story.

Install Java SDK : https://www.youtube.com/watch?v=ld8K8IzpdgQ&t=2s

Install IntelliJ community IDE : https://www.jetbrains.com/idea/download/#section=windows

Download and Install SBT

First of all you want to setup the Scala Build Tool in your computer which is ease your tasks such as automatic compilation of Scala/Java software. SBT is a popular Java build tool such as Maven and Gradle.

Any developer can set up a build tools for the project and saving time and effort for everyone else. Thus these tools are portable and can reproduce your builds for everyone. So Scala has a similar build tool — SBT that provides all these features. You can download SBT from below link:
https://www.scala-sbt.org/learn.html

Fig. 1: Download and install SBT.

Download the Play framework

https://www.playframework.com/getting-started

Fig. 2: Download the ZIP file

Then after you download it, You need to extract it where ever you want. Then delete the two files as in following figure.

Fig. 3: Deleting this two files.

Then open the command prompt from this directory. After you want to update the sbt to latest version using sbt update command on your command prompt.

Fig. 4: SBT updating.

Then simply type the sbt and Enter, The prompt will direct to play project. Then you can compile the project using compile command. Finally you need to run the run command and Those three commands(sbt, compile, run)will successfully run your project as following on the command prompt.

Fig. 5: Run these three commands and initialize your play project.

Open your project with IntelliJ IDE

Before we import the project you need to install the Scala plugin to IDE, as in following image.

Fig. 6: Install Scala Plugins to your IDE

Then you can import the project which we built early.

Fig. 7: Import Play project

After build it successfully, You can change as you want the project controller files or view files, and run it on your favorite browser. Your URL address is http://localhost:9000/. The results will show as following.

Fig. 8: Play Index page.

Conclusion

This story shows you how install and open the play framework project on your windows PC. Please ask any question you will face in response section below. Or you can connect me on linkedln.

https://www.linkedin.com/in/lahiru-ariyasinghe-b43477131

Found this post useful? Kindly tap the 👏 button below! :)

--

--