0
votes

I created a simple scala SBT application in IntelliJ. I have Scala 2.12.8 (the newest) and SBT 1.2.7. Java jdk in path is 9 and in project structure 8. I got this error while building it: Error while importing sbt project:

 java.lang.VerifyError: Uninitialized object exists on backward branch 487
    Exception Details:
    Location:
    scala/reflect/internal/Types.appliedType(Lscala/reflect/internal/Types$Type;Lscala/collection/immutable/List;)Lscala/reflect/internal/Types$Type; @545: goto
    Reason:
    Error exists in the bytecode
    Bytecode:
    0000000: 2cb6 02dd 9900 052b b003 3606 013a 072b
    0000010: c101 7899 0075 0436 062b c001 783a 0719
   ...

I tried to change jdk to 10 and it didn't work. I've also tried to change scala version for older (2.11.12) and it also did not help. Anyone has a solution for this problem?

2
Did you check github.com/sbt/sbt/issues/3516 ? Check your JAVA_HOME settings and use command line java -version to verify SBT is really running using Java 8 or newer.Suma
Yes. My JAVA_HOME is jdk 10.0.2. When I use java -version I got Java 9. Dont know why...Developus

2 Answers

0
votes

Which version of the JDK is your PATH environment variable pointing to? If its pointing to an older version of the JDK, that may be the cause.

0
votes

Ok, I solved it. In IntelliJ, sbt configuration was set to JRE 1.8. I changed it to jdk 10 and finally project built.