I recently gave up trying to use Scala in Eclipse (basic things like termination don't work). So now I'm trying IntelliJ. I'm not very far.
I was able to edit programs (in syntax highlighting and completion ... yay!). But I can’t run even the simplest "Hello World". This was the original error:
Scala signature Predef has wrong version
Expected 5.0
found: 4.1 in .... scala-library.jar
But that was yesterday with IDEA 9.0.1. See below...
UPDATE
Today I uninstalled IntelliJ 9.0.1 and installed 9.0.2 Early Availability with the 4/14 stable version of the Scala plugin.
Then I set up the project from scratch through the wizards:
- new project from scratch
- JDK - 1.6.u20
- accept default value (project) instead of global / module
- accept download Scala 2.8.0beta1 to lib project folder
Created a new class:
object hello {
def main (args: Array [String]) {
println ("hello:" + args);
}
}
For my efforts, I now have a whole new mistake :)
There he is:
Scalac internal error: class java.lang.ClassNotFoundException [java.net.URLClassLoader $ 1.run (URLClassLoader.java:202), java.security.AccessController.doPrivileged (native method), java.net.URLClassLoader.findClass (URLClassLoader : 190), java.lang.ClassLoader.loadClass (ClassLoader.java.307), sun.misc.Launcher $ AppClassLoader.loadClass (Launcher.javahaps01), java.lang.ClassLoader.loadClass (ClassLoader.java: 248) , java.lang.Class.forName0 (Native Method), java.lang.Class.forName (Class.java:169), org.jetbrains.plugins.scala.compiler.rt.ScalacRunner.main (ScalacRunner.java: 72) ]
FINAL UPDATE
I uninstalled 9.0.2 EA and reinstalled 9.0.1, but this time I went with Scala version 2.7.3 and not the default 2.7.6, because 2.7.3 is the one shown in the screenshots on the web IntelliJ website (I think the screenshots prove that they really tested this version!). Now everything works !!!
Alex R Apr 19 '10 at 14:25 2010-04-19 14:25
source share