title: All my java programs are compiling but not running in the command prompt
body: <p>When I try to compile any Java program using the command prompt, the class file is successfully formed and compile time errors, if any are also displayed. However, when I run the program using the command:</p>
  
  <pre><code>java ProgramName
  </code></pre>
  
  <p>then the following error is displayed:</p>
  
  <pre><code>Could not find or load main class ProgramName
  </code></pre>
  
  <p>This happens for all the Java programs I have in my system. I have already checked that the class path and the environment variables are set. I am still unable to find the bug here.</p>