title: Could not find or load main class - VS Code
body: <p>I created a new java project (with the option <code>Create Java Project</code>), and 
  When I click the run button (marked with the red circle), it gives me the error <code>Could not find or load main class</code>.</p>
  
  <p>When I run the program from the <code>run</code> option above the <code>main</code>(marked with the green circle), it works and doesn't show me the error.</p>
  
  <p>How can I fix it?</p>
  
  <p><a href="https://i.stack.imgur.com/9qZwE.png" rel="noreferrer"><img src="https://i.stack.imgur.com/9qZwE.png" alt="The project"></a></p>
  
  <p>This is the <code>.classpath</code> file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;classpath&gt;
      &lt;classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/&gt;
      &lt;classpathentry kind="src" path="src"/&gt;
      &lt;classpathentry kind="output" path="bin"/&gt;
  &lt;/classpath&gt;
  </code></pre>