facebook

Strange NoClassDefFound Error with MyEclipse 7.0 version

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #295146 Reply

    mulpuri
    Participant

    When I am trying to run a class using the Run/Debug command, a JVM window pops up with the message “Could not find the main class. Program will exit.” On the console, I see the following error:

    java.lang.NoClassDefFoundError: com/bnss/avrio/security/Directory
    Exception in thread “main”

    Here Directory is the name of the class that has a main method and is the one I am trying to run.

    I can run the same class using MyEclipse 6.5.

    It looks like there is some setting/preference in 7.0 that is causing this problem. I tried with jdk1.4 and jdk1.5 but get the same result.

    Thanks,
    Bhaskar

    #295169 Reply

    Loyal Water
    Member

    Bhaskar,
    Check the Java build path for the project (right click project, select preferences.) Do you have this Class (com/bnss/avrio/security/Directory ) available there?

    #295199 Reply

    mulpuri
    Participant

    This file is included in the project I am trying to run. The class file is also present.

    Thanks,
    Bhaskar

    #299112 Reply

    mulpuri
    Participant

    What I noticed is that in 7.0, 7.1, the classes folder is not automatically added to the classpath. classes is my default output folder where the class files are built. So in the Run/Debug configuration, you have to explicitly add the classes folder in the Classpath tab under User Entries. In 6.5, this is automatically added. This info comes from the project build settings.

    Is this a bug in 7.0/7.1 ?

    #299135 Reply

    Bhaskar,
    Is this a newly created project or have you imported an already existing project?
    Have you changed the default folder structure of your project?
    Refer to Nipun’s earlier post to configure your project build path.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Strange NoClassDefFound Error with MyEclipse 7.0 version

You must be logged in to post in the forum log in