title: Cannot run jar file: Could not find or load main class Hello
body: <p>I create jar file in IDEA Build>Build Artifacts. But can't run it with <code>java -jar jarname.jar</code> - <code>Error: Could not find or load main class Hello</code>. MANIFEST.MF file is in the /resources/META-INF/ folder. And here is the launcher class:</p>
  
  <pre><code>public class Hello {
  
      public static void main(String[] args) {
          System.out.println("Hello World!");
      }
  
  }
  </code></pre>
  
  <p>MANIFEST.MF:</p>
  
  <pre><code>Manifest-Version: 1.0
  Main-Class: Hello
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/XLksW.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XLksW.jpg" alt="enter image description here"></a></p>
  
  <hr>
  
  <p><strong>EDIT: Added artifacts setting screenshot</strong></p>
  
  <p><a href="https://i.stack.imgur.com/qXwM7.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qXwM7.jpg" alt="enter image description here"></a></p>