0

我下载了scalafx-ensemble项目。当我sbt在项目的文件夹中运行时,我遇到了以下错误:

[info] Set current project to scalafxEnsemble (in build file:/C:/dev/sample/scalafx-ensemble-master/)
[ERROR] Terminal initialization failed; falling back to unsupported
java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected
    at jline.TerminalFactory.create(TerminalFactory.java:101)
    at jline.TerminalFactory.get(TerminalFactory.java:159)
    at sbt.JLine$.sbt$JLine$$terminal(LineReader.scala:87)
    at sbt.JLine$.withTerminal(LineReader.scala:91)
    at sbt.JLine$.usingTerminal(LineReader.scala:97)
    at sbt.JLine$.createReader(LineReader.scala:103)
    at sbt.FullReader.<init>(LineReader.scala:135)
    at sbt.BasicCommands$$anonfun$shell$1.apply(BasicCommands.scala:149)
    ...
    java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected
    at sbt.JLine$$anonfun$usingTerminal$1.apply(LineReader.scala:98)
    at sbt.JLine$$anonfun$usingTerminal$1.apply(LineReader.scala:97)
    at sbt.JLine$.withTerminal(LineReader.scala:92)
    at sbt.JLine$.usingTerminal(LineReader.scala:97)
    at sbt.JLine$.createReader(LineReader.scala:103)
    at sbt.FullReader.<init>(LineReader.scala:135)
    at sbt.BasicCommands$$anonfun$shell$1.apply(BasicCommands.scala:149)
    at sbt.BasicCommands$$anonfun$shell$1.apply(BasicCommands.scala:146)
    at sbt.Command$$anonfun$command$1$$anonfun$apply$1.apply(Command.scala:31)
    at sbt.Command$$anonfun$command$1$$anonfun$apply$1.apply(Command.scala:31)
    at sbt.Command$.process(Command.scala:95)
    at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:100)
    ...
[error] java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected
[error] Use 'last' for the full log.

如果我跑步sbt run,我会得到以下信息:

    at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:3193)
    at scala.tools.nsc.typechecker.Typers$Typer.handleOverloaded$1(Typers.scala:3190)
    at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:3193)
    at scala.tools.nsc.typechecker.Typers$Typer.handleOverloaded$1(Typers.scala:3190)
[error] (compile:compile) java.lang.StackOverflowError
[error] Total time: 9 s, completed Jan 6, 2014 4:47:49 PM

我究竟做错了什么?

4

2 回答 2

1

这可能是过时的 SBT 启动器的问题。确保您的 SBT 是 v.0.13 或更新版本。

于 2014-01-07T00:13:16.153 回答
0

我修复jfxrt.jarbuild.sbt

System.getenv("JAVA_HOME") + "jre/lib/jfxrt.jar"

System.getenv("JAVA_HOME") + "/lib/jfxrt.jar"

这对我的系统是正确的。随着变化,sbt run工作正常。

于 2014-01-06T16:01:42.093 回答