Scala compiler not found
It is probably a silly question, but I can't understand what should I do.
Installed IDEA 10.02, scala plugin, JDK 6.24, scala 2.8.1 (unpacked to C:\scala, set SCALA_HOME=C:\scala). Opened IDEA project with scala code and can't compile scala sources. The problem is:
What is wrong? Why IDEA can't find scala compiler?
请先登录再写评论。
Scala compiler in IDEA project is represented as a (global or project-level) library.
It seems that the project you opened contains a reference to a global library that is not present in your instance of IDEA.
Please, refer to project configuration guide to create a compiler library for the project.
Thanks for the link.
Do you mean that in such situation manual configuration of existing module should be used? Because new project is not an option, new module is not an option either, scala support is already added to module (so there is no scala in "Add Framework Support..."). But actually there is already scala facet in the module configuration, probably only paths to scala distribution should be fixed, something like in this window:
But I can't find where this path to scala distribution can be configured.
The paths can't be found because the whole library is missing (it's system-dependent).
There are two options:
It happens that I was able to fix it just by doing the following:
Now everything is compiled successfully. But this behaviour is rather weird because IDEA should find path to scala automatically as for new project.
So, you've finally created a global Scala compiler library.
That's the way it's supposed to be, there's no automatic Scala distribution discovery because:
I admit that project configuration is a little bit complicated, but that's an inherent property of the matter.
I think there should be some straightforward way to "create a global Scala compiler library". Probably somewhere in File->Settings and not only via creating new empty scala project. Or there should be some way to configure scala settings from the window on first screenshot with "scala-compiler[not found]".