Play 2.2.2 with Java 11

jschnasse :

I have a Play 2.2.2 project I normally run with the activator 1.3.12. Now I updated to Java 11 and activator complains like:

The java installation you have is not up to date
activator requires at least version 1.6+, you have
version 11

Please go to http://www.java.com/getjava/ and download
a valid Java Runtime and install before running activator.

If I try to run the application with sbt 1.2.4 directly I get an unresolved dependency path error

Note: Unresolved dependencies path:
[warn]      com.typesafe.play:sbt-plugin:2.2.2 (scalaVersion=2.12, sbtVersion=1.0) (/myProject/project/plugins.sbt#L8-9) 
[warn]        +- default:myProject-build:0.1.0-SNAPSHOT (scalaVersion=2.12, sbtVersion=1.0) 
[error] sbt.librarymanagement.ResolveException: unresolved dependency: com.typesafe.play#sbt-plugin;2.2.2: not found

Does anyone have any advice on how to get this old project running under Java 11?

Luis Felipe Mendivelso Osorio :

In the case of SBT, remember that SBT is an open-source build tool for Scala and Java projects, similar to Java's Maven and Ant, in this order of ideas, Scala has a minimum and maximum requirement for compatibility with Java, in this link you can find the information:

https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html

I should make a downgrade of your java version to 10.

Good luck.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=107397&siteId=1