title: Eclipse - Error: Could not find or load main class
body: <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.apache.solr&lt;/groupId&gt;
          &lt;artifactId&gt;solr-core&lt;/artifactId&gt;
          &lt;version&gt;4.4.0&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>This dependency is causing Eclipse Juno to give a <em>red cross mark</em> over <strong>pom.xml</strong> and gives error at <code>xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;</code></p>
  
  <p>with the message</p>
  
  <pre><code>Missing artifact jdk.tools:jdk.tools:jar:1.6
  </code></pre>
  
  <p>This causes another problem; I can't run any class in the same project. Running any class gives error </p>
  
  <pre><code>Error: Could not find or load main class ... 
  </code></pre>
  
  <p>Other projects in the same Eclipse workspace are working fine. Even running <strong>"mvn compile"</strong> command is successful.</p>
  
  <p>I tried many solutions I could find on StackOverflow but nothing worked till now. Please help me. </p>