title: Why do I get `java.lang.NoClassDefFoundError: scala/Function1` when I run my code in ScalaIDE?
body: <p>Here is a simple test I'm using to invoke a Scala method from Java:</p>
  
  <pre><code>public static void main(String args[]) {
    java.util.Map&lt;String, java.util.List&lt;String&gt;&gt; rec = news.recommend.DriverObj.runTest();     
    System.out.println(rec.toString());
  }
  </code></pre>
  
  <p>Here is the definition of the Scala method:</p>
  
  <pre><code>def runTest: java.util.Map[String, java.util.List[String]] = {
    new java.util.HashMap[String, java.util.List[String]]
  }
  </code></pre>
  
  <p>But it throws an error:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: scala/Function1
      at news.recommend.DriverObj.runTest(DriverObj.scala)
  </code></pre>
  
  <p>What should I do to make this running smoothly?</p>
  
  <p>Update : I'm running it via Eclipse and my build path contains : </p>
  
  <p><img src="https://i.stack.imgur.com/sCr97.png" alt="enter image description here"></p>
  
  <p>So Scala library should be found ?</p>