title: Clean with eclipse but cannot compile Helloworld in terminal (Error: Could not find or load main class)
body: <p>I'm trying to compile in the terminal (Fedora) my package I've written in eclipse. 
  I need to turn these .java's into my teach for homework but after I compile them in a .class file they will not execute with java DoThisDamnit.java. </p>
  
  <pre><code>root@localhost mypackage# javac -cp . DoThisDamnit.java
  root@localhost mypackage# ls
  DoThisDamnit.class  DoThisDamnit.java
  root@localhost mypackage# java DoThisDamnit.java
  Error: Could not find or load main class DoThisDamnit.java
  </code></pre>
  
  <p>What I have done is the following:</p>
  
  <ul>
  <li>Created a Project name: My Project</li>
  <li>Created a Package name: mypackage</li>
  <li>Created a class file:   DoThisDamnit</li>
  </ul>
  
  <p>After I clean the file it is exported to /home/william/workspace/bin or src. When I go to the bin and type</p>
  
  <pre><code>Java DoThisDamnit.class
  </code></pre>
  
  <p>I get the error <em>Error: could not find or load main class</em></p>
  
  <p>I have a feeling I'm not running it correctly since it has a package?</p>
  
  <p>Code test</p>
  
  <pre><code>package mypackage;
  
  public class DoThisDamnit {
      public static void main(String[] args) {
          System.out.print("Doooo it");
      }
  }
  </code></pre>