My Linked List (with generics) program compiles fine, but when I run it I am getting a class not found exception. Can someone help me?
<p>I am trying to run my linked list in a main method, but for some reason I keep getting the following output from my terminal </p>

<pre><code>    Exception in thread "main" java.lang.NoClassDefFoundError: PhoneBook/java
Caused by: java.lang.ClassNotFoundException: PhoneBook.java
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
</code></pre>

<p>Below I have listed the part of my class where I run the main method. Everything compiles fine, but when I run it I get that exception. Is there away I can try/catch the exception? Or is there something I am doing wrong?</p>

<pre><code>import java.util.LinkedList;

 public class PhoneBook&lt;T&gt; extends LinkedList&lt;T&gt;{

  /**
  * Creates two books, adds a person to each book, then prints out if it
  * found the perons in the book.
  **/
  public static void main(String[] args){
    PhoneBook&lt;String&gt; bookOne = new PhoneBook&lt;String&gt;();
    PhoneBook&lt;Integer&gt; bookTwo = new PhoneBook&lt;Integer&gt;();

    bookOne.addPerson("Obama");
    System.out.print(bookOne.findPerson("Obama"));

    bookTwo.addPerson(192590594);
    System.out.print(bookTwo.findPerson(192590594));
  }
</code></pre>

<p>If more information from my class is needed, I can provide it. I don't think it should be necessary because it compiled fine. </p>
