This tutorial is going to show you how to create a Play Java project using the command line build tool SBT in simple steps.
First, create a workspace in order to keep things organised:
mkdir play-workspace cd play-workspace
Next, run the commands below to invoke the wizard for new projects:
sbt new playframework/play-java-seed.g8
After loading plugins and some processing, you will be prompted to type your project details. For starters, just set the name and the organization like the example below:
This template generates a Play Java project name [play-java-seed]: play-java-lab organization [com.example]: com.bgasparotto scala_version [2.12.4]: play_version [2.6.12]: sbt_version [1.0.4]: Template applied in ./play-java-lab
Go the folder created by the previous commands: cd play-java-lab
Launch your application with SBT:
sbt run ... --- (Running the application, auto-reloading is enabled) --- [info] p.c.s.AkkaHttpServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000 (Server started, use Enter to stop and go back to the console...)
Go to http://localhost:9000 and you should see the following:
To stop the server, just hit Enter
or Ctrl + C
.
Hope it helps. Cya!
This guide will show you how to create a Python function decorator with a few…
This guide will show you how to fix the error Got permission denied while trying…
This guide will show you how to create a Python virtual environment on Intellij IDEA…
This tutorial will quickly show you how to to find and kill processes on Linux,…
This guide shows a possible solution for Python error Relocation R_X86_64_PC32 against symbol can not…
I condensed below a cheat sheet of Kubernetes useful commands. I will keep updating this…