simple classpath question`

Discussion in 'Java' started by cppaddict, Sep 24, 2006.

  1. cppaddict

    cppaddict Guest

    I thought I understood classpaths, but I encountered an error I could
    not explain.

    I have my classpath set to:

    C:\Project1;C:\Project2

    Note that these folders are not packages themselves, but are the root
    folders containing all the package folders and class files.

    One class contained inside of a package in Project2 imports and uses a
    class contained inside of package in Project1. I am getting a
    NoClassDef found error. I could have sworn that this has worked
    before.

    Can someone set me straight on how I need to set this up?

    Thanks in advance,
    cpp
     
    cppaddict, Sep 24, 2006
    #1
    1. Advertisements

  2. cppaddict

    Chris Smith Guest

    There's nothing wrong with anything that you posted. Is there any
    additional information in the NoClassDefFoundError? For example, if it
    includes the words "wrong name", then that'll be a clue that helps a
    lot.

    As a sort of long shot, are you running application with java -jar? Or
    with the -classpath option to the JVM? Either of those will prevent the
    JVM from checking your classpath environment variable.

    Failing any of that, it's probably best for you to poke around and look
    for any additional information you can provide on the problem; enough
    for someone to try to reproduce it (I don't get an error with the setup
    you describe above).
     
    Chris Smith, Sep 24, 2006
    #2
    1. Advertisements

  3. cppaddict

    cppaddict Guest

    Thanks Chris. I just wanted to make sure my understanding wasn't
    flawed. Probably something simple then. I'll take another look.
     
    cppaddict, Sep 24, 2006
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.