Play Framework Tutorial # 1 | Setup Dev Environment in Windows For IntelliJ IDEA IDE
3 min read
1 year ago
Published on Apr 22, 2024
This response is partially generated with the help of AI. It may contain inaccuracies.
Table of Contents
Step-by-Step Tutorial: Setting Up Development Environment for Play Framework in Windows
-
Download and Install JDK:
- Go to google.com and search for "JDK 8 download".
- Accept the license agreement and download the JDK based on your operating system (e.g., Windows 64-bit).
- Install the downloaded JDK by following the installation prompts.
-
Download and Install SBT:
- Search for "SBT download" and download the SBT build tool for Windows.
- Install SBT by following the installation prompts.
-
Download and Install IntelliJ IDEA:
- Search for "IntelliJ IDEA" and choose either the Community version (free) or the Ultimate version (paid/student license).
- For the Ultimate version, apply for a JetBrains student account for a free license key.
- Install IntelliJ IDEA by following the installation prompts.
-
Download Play Framework Starter Project:
- Go to the Play Framework download section and download the starter project for Java.
- Extract the downloaded zip file and delete the SBT files.
- Open a command window in the project folder, then run the command
sbt update
to update dependencies.
-
Configure IntelliJ IDEA:
- Open IntelliJ IDEA and install the Scala plugin by going to
Configure -> Plugins -> Browse repositories -> Search for Scala -> Install
. - Wait for the plugin to download and install.
- Open IntelliJ IDEA and install the Scala plugin by going to
-
Import Play Project in IntelliJ IDEA:
- Open the Play project in IntelliJ by running
sbt
in the project directory. - Select "Import project from external model" and choose SBT.
- Specify the JDK location by navigating to
Program Files -> Java -> JDK folder
. - Finish the import process and allow access as required.
- Open the Play project in IntelliJ by running
-
Set Java Compiler Path:
- Copy the path of the
java c
file located inProgram Files -> Java -> JDK -> bin
. - Update the system environment variables by adding the copied path to the
Path
variable.
- Copy the path of the
-
Compile and Run Play Application:
- In the project directory, run
sbt
in the command prompt to compile the project. - Once compilation is done, run the Play application by typing
run
. - Access the Play application at
localhost:9000
in your web browser.
- In the project directory, run
-
Final Steps:
- Verify that the Play application is running successfully.
- You have now set up your development environment for Play Framework in Windows using IntelliJ IDEA.
-
Next Steps:
- Stay tuned for the next video tutorial on setting up the development environment for Eclipse IDE.
- Subscribe to the channel for more tutorials and updates.
Congratulations! You have successfully set up your development environment for Play Framework in Windows using IntelliJ IDEA.