title: Could not find or load main class package.class
body: <p>I know this question has already been answered many times, but unfortunately I couldn't find the right answer to my questions.</p>
  
  <p>below is my package structure and inside my package I have SimpleTest.java</p>
  
  <p>d:\junit\src\junitfaq\SimpleTest.java</p>
  
  <p>inside d:\junit\src> i tried to compile SimpleTest.java and it successfully compiled using the command below.</p>
  
  <p>d:\junit\src>javac junitfaq/SimpleTest.java </p>
  
  <p>but when i try to run the program using command line below</p>
  
  <p>d:\junit\src>java junitfaq.SimpleTest </p>
  
  <p>this error occured. Error: Could not find or load main class junitfaq.SimpleTest</p>
  
  <p>I tried running it by accessing junitfaq package by using this command</p>
  
  <p>d:\junit\src\junitfaq>java -cp . SimpleTest</p>
  
  <p>the program run perfectly. A little help would be much appreciated.</p>