title: Error: Could not find or load main class Main (unix)
body: <p>I have a java project that has 10 .java files. A1.java, A2.java......A9.java and Main.java. I have to built and run that project in UNIX environment. All the 10 .java files reside inside grand.big.medium.small package.
  To compile the java file I go inside the grand/big/medium/small folder and type the command:</p>
  
  <pre><code>javac *.java
  </code></pre>
  
  <p>All the files gets compiled and all the .class files gets created in the current folder, also, I get the following message:</p>
  
  <pre><code>Note: A4.java uses or overrides a deprecated API.
  Note: Recompile with -Xlint:deprecation for details.
  Note: A4.java uses unchecked or unsafe operations.
  Note: Recompile with -Xlint:unchecked for details.
  </code></pre>
  
  <p>Now I run the Main.class be typing:</p>
  
  <pre><code>java -classpath . Main
  </code></pre>
  
  <p>and I get the error message:</p>
  
  <pre><code>Error: Could not find or load main class Main
  </code></pre>
  
  <p>I am new to Unix and do not know much about this, Could anyone tell what is that I am doing wrong.
  Just to add, I have 3 java version installed</p>
  
  <pre><code> Selection    Path                                            Priority   Status
   ------------------------------------------------------------
    0            /usr/lib/jvm/java-8-oracle/jre/bin/java          1072      auto mode
    1            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   1061      manual mode
    2            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      manual mode
  * 3            /usr/lib/jvm/java-8-oracle/jre/bin/java          1072      manual mode
  
   Press enter to keep the current choice[*], or type selection number: 
  </code></pre>
  
  <p>and I am using Java 8.</p>