Java Play akka项目从jdk8迁移到jdk11

时间:2019-04-24 09:46:32

标签: scala java-8 playframework akka java-11

我正在尝试将使用play和Akka框架在jdk8上构建的项目迁移到jdk11。在此过程中,出现以下错误。有人可以让我知道为什么会引发错误吗? 以下是我使用的版本:

  • JDK-11
  • SCala 2.12.8
  • 播放2.6.7
  • 阿卡2.5.13

例外:

 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 个答案:

答案 0 :(得分:0)

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

  

Java 11
  目前,Play主要支持Java11。所有模块和示例都已经在使用Java进行了测试。我们甚至可以使用Java 11来构建Play本身,只有一个需要解决的已知问题与ssl-config有关。

根据上面的链接,Play将从2.8开始正式支持Java 11。