Play 2.2.2 with Java 11

試著忘記壹切 提交于 2019-12-10 19:04:44

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/52811532/play-2-2-2-with-java-11

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!