Why do I have this error message?

J

John

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.
 
K

Knute Johnson

John said:
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?
 
R

richardsosborn

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)
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top