Getting started with Play Framework

Play Framework - Build Modern & Scalable Web Apps with Java and Scala

                  To start the Play with Java, follow the below steps.

Step 1: The currently available Play version is 2.4.2. To work with this version, make sure that the JAVA_HOME environment variable is set to JDK8 or more.

set JAVA_HOME=<Path to JDK 8 or more where it installed> for Windows
export JAVA_HOME=<Path to JDK 8 more where it installed> for Linux based

Step 2: Download the Typesafe’s Activator(Tool from Typesafe which will allow the developers to create Play project quickly. It is built on top of SBT). The Activator will be available in two formats. One is minimum downloadable artifact online version and the other one is offline fully downloadable version(suitable for developers with no internet connection). In this tutorial, we are going to use the minimum online version.

Step 3: Extract the downloaded Activator zip file and add it to the PATH environment variable.

set PATH=<Path to extracted activator folder>;%PATH%; for Windows
export PATH=<Path to extracted activator folder>:$PATH: for Linux based
For example,set PATH=D:\My_Learnings\typesafe-activator-1.3.5-minimal\activator-1.3.5-minimal;%PATH%;

Step 4: Now, from the command prompt use the below command to create Play for Java application. There are other options available for the activator. To know that, execute activator help command.

activator new Learning_Play_App play-java

Step 5: Now run the Play app which we created in Step 4 and see the default Play UI. From the command prompt, move to the project which we created and execute the below command. When we run the Activator, it will launch the Netty server. To stop the server, use ctrl+D

D:\My_Learnings>cd Learning_Play_App
D:\My_Learnings\Learning_Play_App>activator run

                    First time when you run the activator, it will download all the dependencies from the central repository and will take some time to start the Play application. After the application is started on default port 9000, open the browser and send the request to http://localhost:9999 to see the default Play UI as shown below.

 Play Framework Default Page


        You are done with your first Play Application creation. In the next article, we will try to understand the Play folder structure and exporting it as our favorite IDE project(Like Eclipse, IntelliJ, etc.).


Siva Janapati is an Architect with experience in building Cloud Native Microservices architectures, Reactive Systems, Large scale distributed systems, and Serverless Systems. Siva has hands-on in architecture, design, and implementation of scalable systems using Cloud, Java, Go lang, Apache Kafka, Apache Solr, Spring, Spring Boot, Lightbend reactive tech stack, APIGEE edge & on-premise and other open-source, proprietary technologies. Expertise working with and building RESTful, GraphQL APIs. He has successfully delivered multiple applications in retail, telco, and financial services domains. He manages the GitHub( where he put the source code of his work related to his blog posts.

Tagged with: , ,
Posted in Frameworks, Play
2 comments on “Getting started with Play Framework
  1. Anonymous says:

    I would like to thank you for the efforts you have put in writing this blog.

    I’m hoping to check out the same high-grade blog posts by you later on as well;)

  2. Anonymous says:

    Good information and introduction on Play. Want to see more articles on the same.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.


Java Code Geeks
Java Code Geeks
%d bloggers like this: