Results 1 to 3 of 3

Thread: Cant find Class

  1. #1
    NoviceCoder is offline Member
    Join Date
    Nov 2010
    Posts
    2
    Rep Power
    0

    Default Cant find Class

    I have a strange error running my Java Program in eclipse, and I am not sure if it is eclipse specific. It may be because some of my reference libraries are in JDK 1.5 and the Newest code is in JDK 1.6, but I do not know. Any ideas would be helpful. Here is the error message that I got when attempting to run any of my classes involved in the project.

    java.lang.NoClassDefFoundError: *location and name of class that I ran*
    Caused by: java.lang.ClassNotFoundException: *location and name of class that I ran*
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    Exception in thread "main"

    I have never seen this error before after about a year and a half of using eclipse. It is strange because it seems like eclipse is saying that it cant find the class, but it is the class that I am looking at and running the code in. Anybody had this error before?

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,457
    Blog Entries
    7
    Rep Power
    20

    Default

    Was this really the class name reported by Eclipse? "*location and name of class that I ran*"

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    NoviceCoder is offline Member
    Join Date
    Nov 2010
    Posts
    2
    Rep Power
    0

    Default

    No, but that does not matter. This happened for every class in the project and I took out the location and name of the class because there is personal information in there. It did have the correct location and name of the class, that is not the problem.

Similar Threads

  1. Replies: 6
    Last Post: 05-18-2010, 05:11 PM
  2. How can I find out what class this is?
    By nolsen01 in forum New To Java
    Replies: 8
    Last Post: 03-09-2010, 05:40 PM
  3. Can't find class
    By bozovilla in forum New To Java
    Replies: 2
    Last Post: 07-31-2008, 05:45 AM
  4. JVM Could not find main class
    By banduskank in forum Advanced Java
    Replies: 2
    Last Post: 06-24-2008, 08:05 AM
  5. Replies: 0
    Last Post: 05-13-2008, 06:16 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •