Reputation: 41
In my build.sbt the scala version is "2.11.12" and Intellij version is 2019.2 community edition
and class path also having the same scala jar's version
When I running a scala class I got below error.
Error:scalac: Multiple 'scala-library*.jar' files (scala-library-2.11.12.jar, scala-library-2.11.12.jar) in Scala compiler classpath in Scala SDK sbt: org.scala-lang:scala-library:2.11.12:jar
I tried with multiple options to solve a problem 1.removed scala jars from class path 2. reimport project again 3. invalidate catch
still wont work any option
Upvotes: 1
Views: 204
Reputation: 41
I found the issue, getting issue because there are two scala JDK 1. at project level 2. default at IntelliJ level
By default, the IntelliJ Scala compiler server is also available when running the scala classes.
Previously it was selected Now I just deselected (shown in below screen shot)and click on ok and then ran the classes and it works perfectly.
Upvotes: 0
Reputation: 2138
Most likely you have duplicate entry in one of the xml files in you .idea directory. You could search for it and delete extra entry, or just delete whole .idea directory and re-import your project
Upvotes: 0