title: Can you run a .class file from terminal that is outputted by an IDE
body: <p>I am trying to run a file from command line.  The file is a .class file and is apart of a larger project that I compiled in Netbeans.  I navigated to the .class file and ran</p>
  
  <p>java MyFile</p>
  
  <p>And I got:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: PersonTest/class
  Caused by: java.lang.ClassNotFoundException: PersonTest.class
     at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(URLClassLoader.java:205) 
     at java.lang.ClassLoader.loadClass(ClassLoader.java:321) 
     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) 
     at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
  
  Could not find the main class: PersonTest.class. Program will exit
  </code></pre>
  
  <p>Whats up with that?  (I should mention that i'm running ubuntu)</p>