title: Error while using java.exe
body: <p>I have created a class file <strong>HelloWorld.class</strong> which is in "C:\myData" using javac.exe.</p>
  
  <p>At command prompt I am at <strong>C:\Program Files\Java\jdk1.8.0_91\bin></strong> since I have my java.exe here.</p>
  
  <p>When I execute <strong>java C:\myData\HelloWorld</strong> it gives me the following error :</p>
  
  <p><strong>C:\Program Files\Java\jdk1.8.0_91\bin>   java  C:\myData\HelloWorld</strong></p>
  
  <p><strong>Error: Could not find or load main class C:\myData\HelloWorld</strong></p>
  
  <p>Can some one please assist.</p>
  
  <p>How should I specify the path of my HelloWorld.class file to java.exe. (I wish to resolve this without setting classpath or any environment variables).</p>
  
  <p>Below is my HelloWorld.java code :</p>
  
  <pre><code>public class HelloWorld {
  
      public static void main(String[] args) {
  
          System.out.println("Hello, World");
      }
  
  }
  </code></pre>
  
  <p>Regards.</p>