title: Could not find or load main class
body: <p>I have Windows 7, installed jdk1.7.0 and its supporting jre7.<br>
  My problem is compilation part works perfectly, but while running the Java program I get this error saying:</p>
  
  <blockquote>
    <p>"Could not find or load main class"</p>
  </blockquote>
  
  <p>I am storing all my programs in javalab folder. I have set the path to it. Procedure looks like this:</p>
  
  <pre>
  C:\Users\user>cd\
  
  C:\>cd javalab
  
  C:\javalab>autoexec.bat
  
  C:\javalab>set path=C:\Program Files\Java\jdk1.7.0\bin
  
  C:\javalab>javac p1.java
  
  C:\javalab>java p1
  Error: Could not find or load main class p1
  
  C:\javalab> 
  </pre>