How Install the Play Framework and Open new Project with IntelliJ IDE
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
Download the Play framework
https://www.playframework.com/getting-started
Then after you download it, You need to extract it where ever you want. Then delete the two files as in following figure.
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.
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.
Open your project with IntelliJ IDE
Before we import the project you need to install the Scala plugin to IDE, as in following image.
Then you can import the project which we built early.
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.
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! :)