title: Intellij can't find class in library
body: <p>I've got a weird issue. I'm trying to debug a hadoop job. I've created a configuration profile where the main class is <code>org.apache.hadoop.util.RunJar</code>. I can find this in the browse dialogue by looking under <code>external libraries</code>, then the <code>hadoop-core-xxx.jar</code>, <code>org.apache.hadoop</code>, then <code>utils</code> and <code>RunJar</code>.</p>
  
  <p>When I try actually running this configuration, it fails with a log message <code>Error: Could not find or load main class org.apache.hadoop.util.RunJar</code>. The weird thing is that I've got another project in intellij set up <em>exactly</em> the same AFAICT which works. But this particular project just refuses to be able to find <code>RunJar</code>.</p>
  
  <p>Both have the same maven dependency:</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
          &lt;artifactId&gt;hadoop-core&lt;/artifactId&gt;
          &lt;version&gt;0.20.2-cdh3u6&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>Both set the working directory to <code>/usr/local/opt/hadoop121</code> and both have the <code>single instance only</code> box checked. I'm stumped why I can debug with one project but the other can't find the class.</p>
  
  <p>I've synced the project, invalidated caches, confirmed the <code>hadoop-core-xxx.jar</code> is listed under <code>external libraries</code>... What have I missed? I'm on OSX with the latest version of intellij IDEA.</p>