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

  1. 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.
  2. Download and Install SBT:

    • Search for "SBT download" and download the SBT build tool for Windows.
    • Install SBT by following the installation prompts.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. Set Java Compiler Path:

    • Copy the path of the java c file located in Program Files -> Java -> JDK -> bin.
    • Update the system environment variables by adding the copied path to the Path variable.
  8. 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.
  9. 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.
  10. 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.