The first day to try Scala and Play framework
Contents
Install scala
- Download scala-X.XX.tgz from the official site.
- Unzip archive and move it to /usr/local folder
If you step into ./bin folder, you could use./scala
to run it. - Open your .bash_profile file :
sudo nano ~/.bash_profile
- Add scala/bin folder to your PATH
export PATH=/usr/local/scala/bin:$PATH
Control + X to save and restart. - Check successful by typing Scala in terminal
If you see below, then Scala is successfully installed.1
2Welcome to Scala 2.12.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_121).
Type in expressions for evaluation. Or try :help.
Play framework
- Download a project from Play Framework.
- Run
./sbt run
It will automatically download all the necessaries during the first time. - Navigate to
localhost:9000
, if you see a web page, it is successful.