title: java.lang.NoClassDefFoundError in cmd
body: <p>I am facing this problem while trying to run my java file by writing java filename ....</p>
  
  <p>I have read on many pages the possible ways this could be corrected but unfortunately I have been unable to correct my problem...</p>
  
  <ol>
  <li><p>First of all I looked at my environment variables and observed that there was no <strong>CLASSPATH</strong>     set and I had pointed <strong>PATH</strong> correctly to my jre as well as jdk bin in C:\</p></li>
  <li><p>Second I am able to run <strong><em>javac filename.java</em></strong> and observe that .class file gets built in the  local directory.</p></li>
  <li><p>While writing <strong>javac -classpath . filename</strong> works writing <strong>java -classpath . filename</strong> (without .class) results in the same error.</p></li>
  </ol>
  
  <p>I just don't know how to run my program in command prompt!!!!
  Please do not give me links to the pages which have given the same answers that I have mentioned above as they do not work in my case.....</p>
  
  <p>Please help....</p>