Results 1 to 2 of 2
  1. #1
    Mestika is offline Member
    Join Date
    Sep 2010
    Rep Power

    Default NoClassDefFoundError: Can't find the class


    I’ve working on a project in my class where we use a framework called JCAF which is a jar file that we import into eclipse and then add it to the build path but a problem arises when I try to run the application and not when my teammember is. It should say that we use CVS so everything is exactly identical on both computers / eclipse. Furthermore are we both using Windows 7 Pro 64-bit operating system.

    The error is a bit complex to explain, so please ask if I need to clarify something.

    In a packet called “assignment.main” we’ve got a java file called “” where your main method is located.
    When I try to run the main, I get following error:
    Java Code:
    Could not find the main class: assignment.main.DisplayListener. 
    Program will exit
    The problem is, that it should find the main class, because the Abstract class we use is located in the JCAF jar file and which is imported. At the very top of my, I’ve imported
    Java Code:
    which it imports without any problems.

    In my Eclipse Console window I get this error:

    Java Code:
    java.lang.NoClassDefFoundError: dk/pervasive/jcaf/EntityListener
    I’m not sure if it is the problem or it is located another place but I have a strong assumption that it is the JCAF framework and the jar file because the code otherwise is identical to my teammembers which, as said, works fine.

    Does anyone knows what or how to solve the problem? I’ve tried to find the error with no luck.

    - Mestika

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power


    When I try to run the main,
    How are you trying "to run" the program? What is the commandline you use?
    What folder are you in when you issue the java command?
    Has the program been compiled successfully?

    Is this an IDE configuration problem? If so, try asking how to configure your IDE on a forum for the IDE.

Similar Threads

  1. Replies: 2
    Last Post: 01-20-2014, 08:45 AM
  2. Replies: 6
    Last Post: 05-18-2010, 06:11 PM
  3. Replies: 6
    Last Post: 04-15-2010, 04:50 AM
  4. Class is there but NoClassDefFoundError
    By jallmer in forum NetBeans
    Replies: 7
    Last Post: 11-19-2009, 04:37 AM
  5. Replies: 0
    Last Post: 05-13-2008, 07: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