title: How to run java program in command prompt,created by intellij
body: <p>How do I run my Java program in command prompt, my project was created in Intellij, and I am having difficulties running it in the command prompt...without using the Intellij in creating project,I can run the java program in command prompt.</p>
  
  <p>I do this like this.</p>
  
  <pre><code>java myjava -&gt;this would work.
  </code></pre>
  
  <p>but the project created by Intellij,this is the path.</p>
  
  <pre><code>C:\myjava\sampl1\src\com\myexample\test&gt;
  </code></pre>
  
  <p>when I issue this command</p>
  
  <pre><code>java myjava -&gt; Error: Could not find or load main class myjava
  </code></pre>
  
  <p>but I am inside in that directory.</p>
  
  <p>Thank you in advance.</p>