IntelliJ Error: Scala 145, Error: scalac: Scala JAR compiler not found

I am trying to compile a simple object in IntelliJ:

object Test02 { def main(args: Array[String]) { println("Hello World"); }} 

I received this message:

 Error:scalac: Scala compiler JARs not found (module 'scala02'): E:\.ivy2\cache\org.scala-lang\scala-library\jars\scala-library-2.11.8.jar, E:\.ivy2\cache\org.scala-lang\scala-compiler\jars\scala-compiler-2.11.8.jar, E:\.ivy2\cache\org.scala-lang\scala-reflect\jars\scala-reflect-2.11.8.jar 

I checked the project structure and checked the modules. Modules are located here:

 C:/Users/asus1/.ivy2/cache/org.scala-lang/scala-compiler/jars/scala-compiler-2.11.8.jar 

How can I change E: to C: / Users / asus1 /? I need to move everything to E :?

How do people manage when the project and the bank are in another place?

Seems big mistake IntellJ ...?

+5
source share
2 answers

RESOLVED, as follows:

In the project settings you need to manually add:

1) JDK folder 2) Module and dependencies to JDK And Scala JAR

3) In the library, add the MANUALLY JAR from Scala (IntelliJ does not add these JARs, it creates compilation problems).

4) in the global library, check that the Scala JARs match.

It is possible to see DEBUG in detailed mode:

https://intellij-support.jetbrains.com/hc/articles/207241085

It is very useful.

+1
source

Please go to File> Preferences ( Ctrl + Alt + S )> Plugin Find "scala". Remove the Scala plugin .. Restart the IDE. Reinstall it. Restart the IDE and install the plugin. Everything is working fine

+9
source

Source: https://habr.com/ru/post/1246180/


All Articles