Results 1 to 3 of 3
  1. #1
    egran001 is offline Member
    Join Date
    Mar 2012
    Posts
    3
    Rep Power
    0

    Default Another NoClassDefFoundError

    Hey all,

    I've search around some and found some answers to this problem; however, I'm just not able to fix it.
    I have the following situation:

    (Eclipse IDE)

    Project A
    -sourceFolder A
    --Package A
    ---Class A

    Project B
    -sourceFolder B
    --Package B
    ---Class B

    Class A extends Class B

    Right clicked Project A > Build Path > Configure Build Path
    Under the Projects Tab I added Project B.

    This allowed me to do the extension and to access all of the methods and attributes. This also compiles fine; however, when I run it I get a NoClassDefFoundError. I'm obviously missing something in working with the classpath which is why I'm guessing I'm getting a NoClassDefFoundError

    Any help is appreciated! Thanks!
    E

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,423
    Rep Power
    20

    Default Re: Another NoClassDefFoundError

    I'm getting a NoClassDefFoundError
    When seeking help with an error, post the entire text and stack trace. don't paraphrase and don't abbreviate.

    Class B needs to be on the runtime classpath. have you taken care of that?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    egran001 is offline Member
    Join Date
    Mar 2012
    Posts
    3
    Rep Power
    0

    Default Re: Another NoClassDefFoundError

    Understood about the stack trace!

    Thanks for the help. I wasn't thinking and completely forgot that I needed to set the runtime classpath.

    For those who find this post and don't understand...

    - In eclipse go to Run > Run Configurations
    - Select the "Java Application" from the left pane that you wish to run.
    - Click on the Classpath tab and add any projects or jars that are required.

    Thanks again for the reminder Darryl! Works perfectly now!
    Eric

Similar Threads

  1. NoClassDefFoundError
    By Leeish in forum Advanced Java
    Replies: 10
    Last Post: 09-27-2011, 09:08 AM
  2. NoClassDefFoundError
    By bmeu in forum JDBC
    Replies: 1
    Last Post: 10-30-2010, 08:08 PM
  3. NoClassDefFoundError
    By Josisco in forum JDBC
    Replies: 2
    Last Post: 10-30-2010, 08:07 PM
  4. noClassDefFoundError
    By imorio in forum Eclipse
    Replies: 11
    Last Post: 08-21-2010, 07:45 PM
  5. NoClassDefFoundError
    By Dbirge in forum New To Java
    Replies: 0
    Last Post: 03-16-2010, 05:01 PM

Posting Permissions

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