Scala SBT Call IncompatibleClassChangeError Exception

I tried installing SBT for Scala, but when it starts, it gets this strange exception:

Exception in thread "main" java.lang.IncompatibleClassChangeError: Expected static method scala.Predef$.refArrayOps([Ljava/lang/Object;)Lscala/collection/mutable/ArrayOps; at xsbt.boot.Boot$.main(Boot.scala:11) at xsbt.boot.Boot.main(Boot.scala) 

My version of Java

 java version "1.8.0_66" Java(TM) SE Runtime Environment (build 1.8.0_66-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode) 

I installed SBT via (home) brew and got version 0.13.9.

I tried updating Java to the latest version, but that will not help. Of course, I uninstalled and reinstalled SBT, with both the home and without, and without it, but I get the same error. I can not understand why this error occurs.

+6
source share
1 answer

Remove any extraneous JAR files from the Java Extensions directory. I encountered the same error after creating the BFG Repo-Cleaner and then installed the resulting bfg.jar in / Library / Java / Extensions on macOS. After that, sbt failed with the above error message until bfg.jar was removed from / Library / Java / Extensions.

0
source

All Articles