title: How to use Scala in IntelliJ IDEA (or: why is it so difficult to get a working IDE for Scala)?
body: <p>I recently gave up trying to use Scala in Eclipse (basic stuff like completion doesn't work). So now I'm trying IntelliJ. I'm not getting very far.</p>
  
  <p>I've been able to edit programs (within syntax highlighting and completion... yay!). But I'm unable to run even the simplest "Hello World".  This was the original error:</p>
  
  <pre>
  Scala signature Predef has wrong version
  Expected 5.0
  found: 4.1 in .... scala-library.jar
  </pre>
  
  <p>But that was yesterday with IDEA 9.0.1. See below...</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Today I uninstalled IntelliJ 9.0.1, and installed 9.0.2 Early Availability, with the 4/14 stable version of the Scala plug-in.</p>
  
  <p>Then I setup a project from scratch through the wizards:</p>
  
  <ul>
  <li>new project from scratch</li>
  <li>JDK is 1.6.u20</li>
  <li>accept the default (project) instead of global / module</li>
  <li>accept the download of Scala 2.8.0beta1 into project's lib folder</li>
  </ul>
  
  <p>Created a new class:</p>
  
  <pre>
  object hello {
    def main(args: Array[String]) {
      println("hello: " + args);
    }
  }
  </pre>
  
  <p>For my efforts, I now have a brand-new error :)</p>
  
  <p>Here it is:</p>
  
  <p>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.java:190), java.lang.ClassLoader.loadClass(ClassLoader.java:307), sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301), 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)]</p>
  
  <p><strong>FINAL UPDATE</strong></p>
  
  <p>I uninstalled 9.0.2 EA and reinstalled 9.0.1, but this time went with the 2.7.3 version of Scala rather than the default 2.7.6, because 2.7.3 is the one shown in the screen-shots at the IntelliJ website (I guess the screen-shots prove that they actually tested this version!). Now everything works!!!</p>