title: Executing batch file error: "Could not find or load main class"
body: <p>I am a newbie in java programming. I have this batch file called StartSample.bat. This batch file runs a java program. This is the code for the batch file:</p>
  
  <pre class="lang-dos prettyprint-override"><code>@echo off
  set CLASSPATH=%CLASSPATH%;f3bc4jav.jar
  set CLASSPATH=%CLASSPATH%;PalmSecureSample_Java.jar
  
  @echo on
  java &lt;classname&gt;
  </code></pre>
  
  <p>The .jar files mentioned above are on the same folder as the batch file. </p>
  
  <p>When I run StartSample.bat, it executes the Java Program just as it should.</p>
  
  <p>Now what I did was I created Java Class to run that batch file with this code:</p>
  
  <pre class="lang-java prettyprint-override"><code>Process p = Runtime.getRuntime().exec("C:\\WINDOWS\\system32\\cmd.exe /c start C:\\Identify\\dll\\StartSample.bat");
  </code></pre>
  
  <p>The error occurs when I run my code. The error is:</p>
  
  <pre class="lang-none prettyprint-override"><code>C:workspace\Project&gt;java &lt;classname&gt; Error: Could not find or load main class &lt;classname&gt;
  </code></pre>
  
  <p>What seems to be the problem?</p>