【发布时间】:2018-01-22 05:04:23
【问题描述】:
我正在尝试运行 Scala Play!项目,我安装了jdk 9。我尝试使用启动项目和使用 sbt 两种方式创建项目。 sbt compile 工作正常,但 sbt run 抛出异常。
我从该页面http://developer.lightbend.com/start/?group=play 下载了 play-scala-start-example.zip,将其解压缩到一个文件夹中,然后 cd 到该文件夹并 sbt run 给我以下错误:
java.lang.NumberFormatException: Not a version: 9
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:359)
at play.runsupport.Reloader$.reloader$lzycompute$1(Reloader.scala:220)
at play.runsupport.Reloader$.play$runsupport$Reloader$$reloader$1(Reloader.scala:220)
at play.runsupport.Reloader$.startDevMode(Reloader.scala:230)
at play.sbt.run.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$2$$anonfun$apply$3.devModeServer$lzycompute$1(PlayRun.scala:77)
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:77)
at play.sbt.run.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$2$$anonfun$apply$3.apply(PlayRun.scala:100)
at play.sbt.run.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$2$$anonfun$apply$3.apply(PlayRun.scala:63)
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: 9
已解决:与我前段时间安装的 jdk 1.8.0_121 完美配合。
【问题讨论】:
-
是的,我在安装所需软件时速度太快了,我的错
标签: scala playframework sbt