在Windows 10上安装SBT 1.0.1后,运行任何sbt命令会导致以下错误。这与sbt git issue中报告的错误相同,但我已经安装了JDK 1.8.0_144。
C:\>java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
>sbt new sbt/scala-seed.g8
"C:\Users\****\.sbt\preloaded\org.scala-sbt\sbt\"1.0.1"\jars\sbt.jar"
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
java.lang.VerifyError: Uninitialized object exists on backward branch 162
Exception Details:
Location:
scala/util/matching/Regex.unapplySeq(Lscala/util/matching/Regex$Match;)Lscala/Option; @216: goto
Reason:
Error exists in the bytecode
Bytecode:
0x0000000: 2bc6 000a 2bb6 00ef c700 07b2 0052 b02b
0x0000010: b600 f2b6 00f3 2ab6 0054 4d59 c700 0b57
0x0000020: 2cc6 000d a700 c92c b600 f799 00c2 bb00
...
答案 0 :(得分:1)
从Path环境变量中删除指向旧版JDK的文件夹后,这已得到修复。最新的Oracle安装版本的java.exe是在路径的早期版本,但我怀疑它是去旧文件夹找到sbt正在运行的一些步骤的javac.exe。我还将JAVA_HOME环境变量设置为较旧的JDK,并将其删除以进行安全测量。