sbt 0.13.0 检测到 JLine 不兼容 [英] sbt 0.13.0 JLine incompatibility detected
问题描述
我在使用山狮和 Java 7 的 mac 上启动 play 2.2.0 应用程序时遇到问题:
I have a problem with starting a play 2.2.0 app on my mac with mountain lion and java 7:
[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.ConsoleLogger$.ansiSupported(ConsoleLogger.scala:85)
at sbt.ConsoleLogger$.<init>(ConsoleLogger.scala:79)
at sbt.ConsoleLogger$.<clinit>(ConsoleLogger.scala)
at sbt.GlobalLogging$.initial(GlobalLogging.scala:40)
at sbt.StandardMain$.initialGlobalLogging(Main.scala:54)
at sbt.StandardMain$.initialState(Main.scala:60)
at sbt.xMain.run(Main.scala:26)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:57)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:77)
at xsbt.boot.Launch$.run(Launch.scala:57)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:45)
at xsbt.boot.Launch$.launch(Launch.scala:65)
at xsbt.boot.Launch$.apply(Launch.scala:16)
at xsbt.boot.Boot$.runImpl(Boot.scala:32)
at xsbt.boot.Boot$.main(Boot.scala:21)
at xsbt.boot.Boot.main(Boot.scala)
java.lang.IncompatibleClassChangeError: JLine incompatibility detected. Check that the sbt launcher is version 0.13.x or later.
at sbt.ConsoleLogger$.ansiSupported(ConsoleLogger.scala:96)
at sbt.ConsoleLogger$.<init>(ConsoleLogger.scala:79)
at sbt.ConsoleLogger$.<clinit>(ConsoleLogger.scala)
at sbt.GlobalLogging$.initial(GlobalLogging.scala:40)
at sbt.StandardMain$.initialGlobalLogging(Main.scala:54)
at sbt.StandardMain$.initialState(Main.scala:60)
at sbt.xMain.run(Main.scala:26)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:57)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:77)
at xsbt.boot.Launch$.run(Launch.scala:57)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:45)
at xsbt.boot.Launch$.launch(Launch.scala:65)
at xsbt.boot.Launch$.apply(Launch.scala:16)
at xsbt.boot.Boot$.runImpl(Boot.scala:32)
at xsbt.boot.Boot$.main(Boot.scala:21)
at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.lang.IncompatibleClassChangeError: JLine incompatibility detected. Check that the sbt launcher is version 0.13.x or later.
它并没有真正链接到播放,因为我在该目录中直接启动 sbt 时遇到了同样的错误.所以我尝试了几件事:
It's not really linked to play since I got the same error when I start directly sbt in that directory. So I tried a couple of things:
- 从我的家庭目录中删除了所有与 sbt 相关的内容,并尝试使用来自 https://的 sbt 脚本github.com/paulp/sbt-extras/blob/master/sbt -> 同样的问题
- 从我的常春藤仓库目录中删除所有 jar 并重新启动 sbt -> 同样的问题
- 直接下载了一个 sbt 启动器(版本 0.13.0)-> 同样的问题
- 尝试使用 java 6 -> 同样的问题
- 尝试调试 sbt 以找出问题所在,但我发现 jline 无法识别它应该使用 UnixTerminal(我通过设置 systemProperties 使其工作)但又 -> 相同的错误
我认为这与一些奇怪的链接有关,因为应该使用的终端的类版本似乎很旧.至少这是 jvm 所抱怨的.
It's somehow related to some strange linking I think because the class version for the terminal which should be used seems to be old. At least this is what the jvm is complaining about.
我在带有 ubuntu 的虚拟机上尝试过它运行良好,所以我认为我的系统一团糟,或者我做错了什么.
I tried it on a virtual box with ubuntu which worked fine so I think my system is a mess or I did something completely wrong.
有人有什么想法吗?
推荐答案
如果您在启用详细类加载 (-verbose:class
) 的情况下启动 JVM,这可能有助于解决有问题的 JLine 类的位置来自.也许您的 JVM 扩展目录之一中有一个 JLine jar,可能是 ~/Library/Java/Extensions
或 /System/Library/Java/Extensions
.
If you start the JVM with verbose class loading enabled (-verbose:class
), that might help troubleshoot where the offending JLine classes are coming from. Perhaps you have a JLine jar in one of your JVM extension directories, probably ~/Library/Java/Extensions
or /System/Library/Java/Extensions
.
这篇关于sbt 0.13.0 检测到 JLine 不兼容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!