Set up env for Play Scala framework


Use the terminal (Mac) and command prompt (Windows) to build the environment. Please refer to the following site for each activation method.

Terminal (Mac)

Command prompt (Windows)

I.Install Homebrew (Mac users only)

On a Mac, we will use a package management system called Homebrew in the following environment construction procedure.
Homebrew Install using the instruction from official website.

1) Install Command Line Tools

To use Homebrew, you need to install Command Line Tools for Xcode.

When you execute the following command from the terminal, the installation confirmation dialog is displayed.
Click the install button.

xcode-select --install

2) Install Homebrew

Install it by running the following command:

/usr/bin/ruby -e "$(curl -fsSL"

3) Installation confirmation

Run the following command.

brew --version

If you see the following, you’re okay.
(Latest version 2020-09-06: 2.4.16)

Homebrew 2.4.16
Homebrew/homebrew-core (git revision 7ec07; last commit 2020-09-06)
Homebrew/homebrew-cask (git revision f373b; last commit 2020-09-06)

If the version is old, update it with the following command.

brew update

II. Java environment installation

Scala runs on the Java platform (Java Virtual Machine), so a JVM must be installed. Also, use Amazon Corretto 8 on Mac and Windows as the JDK to use.


1) Download pkg file

Download “amazon-corretto-preview2-8u192-macosx-x64.pkg” from the following site.

2) Installation

Double-click the downloaded pkg file and install it according to the installation procedure.

3) Setting environment variables

Config the following settings in .bash_profile, .zshrc, etc.

export JAVA_HOME=/Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home
export PATH=$JAVA_HOME/bin:$PATH

*The path set in JAVA_HOME can be obtained from this command.


4) Installation confirmation

Execute the following command in CLI terminal.

java -version

If you see the following, you are successful.
(Latest version as of January 8, 2019: 1.8.0_192)

openjdk version "1.8.0_192"
OpenJDK Runtime Environment (build 1.8.0_192-amazon-corretto-preview2-b12)
OpenJDK 64-Bit Server VM (build 25.192-b12, mixed mode)

III.IntelliJ environment

IntelliJ is an integrated development environment that supports multiple languages ​​such as Java.
It is also the base of Android Studio, which is famous as an Android development environment.

Install IntelliJ

1) Download


Click “DOWNLOAD” for the Community edition from this site to download the .dmg file.

Download IntelliJ


Click “DOWNLOAD” for Community edition from this site to download the .exe file.


Click “DOWNLOAD” for the Community edition from this site to download the .tar.gz file.

2) Install


Open the .dmg package and drag and drop IntelliJ IDEA into your application folder


Launch the .exe file and follow the installation wizard


Extract the .tar.gz file and run bin /


3) IntelliJ configuration

Start IntelliJ.
The following dialog will be displayed. Select [Do not import …] and click [OK].

Check [I confirm …] and click [Continue].

The following screen will appear Select your favorite design and click
[Next: Keymaps]

Click [Next: Launcher Script]

Click [Next: Default plugins]

Click [Next: Featured plugins]

Click Install in Scala to install the Scala plugin. Finally, click [Start using Intellij IDEA] to complete.

IV. Install sbt

What is sbt?

sbt is a build tool for Scala.
You will need it to create and build Playframework projects.

1) Install sbt


brew install sbt


Download [sbt-1.2.8.msi] from the following site and double-click to install it.



Follow the steps on this site to install.


5. Create Project

1) Move to the directory where you want to place the project

Change to the appropriate directory where you want to place the project files.


2) Create a new project

sbt new playframework/play-scala-seed.g8

This template generates a Play Scala project 

name [play-scala-seed]: 

Enter “sample-play-scala” here.

Then continue with default

This template generates a Play Scala project

name [play-scala-seed]: sample-play-scala
organization [com.example]:

Template applied in ./sample-play-scala

On Windows, you may get the following error, but you can safely ignore it.

[error] Unable to delete file: \AppData\Local\Temp\giter8-86279809762767\src\main\g8\.gitignore
[error] Use 'last' for the full log.

3) Confirm that the project has been created

It’s okay if the directory where you executed the command has a “sample-play-scala” directory.

6. Import project

1)Click Import Project

2) Select the root directory of the project created above.

3) Select [Import project from external model] and SBT and click the [Next] button.

スクリーンショット 2019-01-09 12.38.50.png

4) Import settings

Click the [New …] button in the [Project JDK]

スクリーンショット 2019-01-09 12.41.20.png

5) Select [JDK] in the next dialog.

6) The directory selection dialog is displayed. Select the Java installed above.




C:\Program Files\Amazon Corretto\jdk1.8.0_192



7) Sync will start. When Sync is complete, everything is ready.

Make sure the scaffolding project working by showing up “Welcome to Play!” in browser after run below command in project dir

cd sample-play-scala
sbt run