title: How to compile a java program which implements package from command prompt
body: <p>I have a folder names "projects" in c drive. i store all my java files in that folder.</p>
  
  <p>my class path is : <code>c\projects</code></p>
  
  <p>Now i created a java file as myProgram in projects folder. in that file or program i created a package whose name is myPackage using the simple syntax</p>
  
  <pre><code>package myPackage;
  </code></pre>
  
  <p>at the very top of the program.</p>
  
  <p>when i compile this program on the command prompt using following commands</p>
  
  <pre><code>c:\projects &gt; javac myPackage.myProgram.java
  </code></pre>
  
  <p>i am getting the error</p>
  
  <pre><code>error: cannot read: myPackage.myProgram.java 1 error
  </code></pre>
  
  <p>please help</p>