Why do I have this error message?

Discussion in 'Java' started by John, Jun 13, 2007.

  1. John

    John Guest

    I am using eclipse to compile a java application.

    It works fine if I right click the class that contains main. But If I run it
    in dos window, I get this error message,

    Exception in Thread "main" java.lang.NoClassDefFoundError:

    I had this error message a few days ago, then I fixed it, and then I havn't
    gone back to command line util today I finished everything and it works fine
    if I just right click and Run As..Java application.

    When finally I returned to command prompt, the error message came back.

    I tried previous version of my application and the same error message. It
    doesn't seem to be a problem with my application but I do remember when last
    time the error came, I fixed it by going to the proper path.

    Now, no matter what I try, I fail.

    Anybody can help? I am using windows xp sp2 with the latest eclipse.
     
    John, Jun 13, 2007
    #1
    1. Advertising

  2. John wrote:
    > I am using eclipse to compile a java application.
    >
    > It works fine if I right click the class that contains main. But If I run it
    > in dos window, I get this error message,
    >
    > Exception in Thread "main" java.lang.NoClassDefFoundError:
    >
    > I had this error message a few days ago, then I fixed it, and then I havn't
    > gone back to command line util today I finished everything and it works fine
    > if I just right click and Run As..Java application.
    >
    > When finally I returned to command prompt, the error message came back.
    >
    > I tried previous version of my application and the same error message. It
    > doesn't seem to be a problem with my application but I do remember when last
    > time the error came, I fixed it by going to the proper path.
    >
    > Now, no matter what I try, I fail.
    >
    > Anybody can help? I am using windows xp sp2 with the latest eclipse.
    >
    >


    Why don't you show us the output from the terminal including the
    interpreter invocation and the complete error?

    --

    Knute Johnson
    email s/nospam/knute/
     
    Knute Johnson, Jun 13, 2007
    #2
    1. Advertising

  3. John

    Roedy Green Guest

    On Wed, 13 Jun 2007 17:05:13 -0400, "John" <> wrote,
    quoted or indirectly quoted someone who said :

    >Exception in Thread "main" java.lang.NoClassDefFoundError:


    See
    http://mindprod.com/jgloss/runerrormessages.html#NOCLASSDEFFOUNDERROR

    That is my least favourite error message. It has a zillion possible
    causes.

    I decorate the entry with The Scream, by Edvard Munch.
    --
    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
     
    Roedy Green, Jun 15, 2007
    #3
  4. John

    Guest

    On Jun 13, 5:05 pm, "John" <> wrote:
    > I am using eclipse to compile a java application.
    >
    > It works fine if I right click the class that contains main. But If I run it
    > in dos window, I get this error message,
    >
    > Exception in Thread "main" java.lang.NoClassDefFoundError:
    >
    > I had this error message a few days ago, then I fixed it, and then I havn't
    > gone back to command line util today I finished everything and it works fine
    > if I just right click and Run As..Java application.
    >
    > When finally I returned to command prompt, the error message came back.
    >
    > I tried previous version of my application and the same error message. It
    > doesn't seem to be a problem with my application but I do remember when last
    > time the error came, I fixed it by going to the proper path.
    >
    > Now, no matter what I try, I fail.
    >
    > Anybody can help? I am using windows xp sp2 with the latest eclipse.



    The most common causes I find, John, are classpath settings and
    mis-using parts of a class's API. (method signatures)
     
    , Jun 19, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?ZGF2aWQ=?=
    Replies:
    6
    Views:
    5,546
    Kevin Spencer
    Aug 18, 2005
  2. Mr. SweatyFinger

    why why why why why

    Mr. SweatyFinger, Nov 28, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    974
    Mark Rae
    Dec 21, 2006
  3. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,211
    Smokey Grindel
    Dec 2, 2006
  4. PB
    Replies:
    10
    Views:
    6,703
    Dave Thompson
    Mar 27, 2006
  5. Nanostuff
    Replies:
    9
    Views:
    160
    Gary Wright
    Mar 1, 2007
Loading...

Share This Page