title: run java program through batch file
body: <p>I want to run my java program through a .bat file. My java program is present in a bin subfolder of the java folder. My batch file is present in the batch folder.</p>
  
  <pre><code>cd..
  cd java
  cd bin
  javac screenshot.java
  java screenshot
  pause
  </code></pre>
  
  <p>The above is the script in my batch file.The program is getting compiled, but while running i am getting:</p>
  
  <pre><code>Error:Could not find or load main class screenshot.
  </code></pre>
  
  <p>Can someone tell me where i went wrong? I am stuck.</p>