Java Play akka project migration from jdk8 to jdk11

社会主义新天地 提交于 2019-12-07 12:42:15

问题


I am trying to migrate the project which was built on jdk8 using play and Akka framework to jdk11. During the process, I am getting the below error. Could someone please let me know why is the error being thrown? Below are the versions I am using:

  • JDK-11
  • SCala 2.12.8
  • Play 2.6.7
  • Akka 2.5.13

Exception:

 java.lang.NumberFormatException: Not a version: 11
    at scala.util.PropertiesTrait$class.parts$1(Properties.scala:176)
    at scala.util.PropertiesTrait$class.isJavaAtLeast(Properties.scala:180)
    at scala.util.Properties$.isJavaAtLeast(Properties.scala:16)
    at play.dev.filewatch.FileWatchService$$anon$1.delegate$lzycompute(FileWatchService.scala:68)
    at play.dev.filewatch.FileWatchService$$anon$1.delegate(FileWatchService.scala:66)
    at play.dev.filewatch.FileWatchService$$anon$1.watch(FileWatchService.scala:79)
    at play.runsupport.Reloader.<init>(Reloader.scala:358)
    at play.runsupport.Reloader$.reloader$lzycompute$1(Reloader.scala:219)
    at play.runsupport.Reloader$.play$runsupport$Reloader$$reloader$1(Reloader.scala:219)
    at play.runsupport.Reloader$.startDevMode(Reloader.scala:229)
    at play.sbt.run.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$2$$anonfun$apply$3.devModeServer$lzycompute$1(PlayRun.scala:79)
    at play.sbt.run.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$2$$anonfun$apply$3.play$sbt$run$PlayRun$$anonfun$$anonfun$$anonfun$$devModeServer$1(PlayRun.scala:79)
    at play.sbt.run.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$2$$anonfun$apply$3.apply(PlayRun.scala:102)
    at play.sbt.run.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$2$$anonfun$apply$3.apply(PlayRun.scala:65)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
[trace] Stack trace suppressed: run last compile:run for the full output.
[error] (compile:run) java.lang.NumberFormatException: Not a version: 11

回答1:


https://www.lightbend.com/blog/roadmap-revealed-for-play-2.8-and-lagom-1.6

Java 11
At this point, Play mostly supports Java 11. All the modules and samples are already being tested using Java; we even have Play itself building with Java 11, there is only a know issue we need to solve, related to ssl-config.

According to the link above, Play will officially support Java 11 since 2.8.



来源:https://stackoverflow.com/questions/55827115/java-play-akka-project-migration-from-jdk8-to-jdk11

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