Thursday 15 December 2016

Java & Play Framework

1. Install Oracle IDK (latest version -- 1.8.0_122)

2. download Play with Activator (last version -- Activator 1.3.12 including Play 2.5.10)
https://www.playframework.com/download

3. download Scala IDE (last version 4.5.0) - The bundle contains the lastest release version of the Scala IDE for Eclipse and it comes pre-configured for optimal performance
http://scala-ide.org/download/sdk.html

4. Setting Play by add the following into PATH
  - activator-dist-1.3.12\bin

5. Setting JAVA_HOME
  - Java\jdk1.8.0_112\bin

6. Setting sbteclipse : https://github.com/typesafehub/sbteclipse
- add  global file (for version 0.13 and up) at ~/.sbt/0.13/plugins/plugins.sbt
- content:  addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.0.1")

7. Go to user worksapce (ex. PlayWorkspace), the create new project

-   [...]$  activator new
-   [...]$ select play_java
-   [...]$  type name of project, ex. DemoPlayJava
-   [...]$ cd DemoPlayJava
-   [...]$ activator ui    (for using web browser to manage the project)
-   [...]$ create eclipse project by:   activator clean compile eclipse

Now can opem ScalaIDE and import the DemoPlayJava project without any error like:
https://github.com/scala-ide/scala-ide-play2/issues/215

Read book:  Play for Java cover 2