Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

clobber the classpath?

Status
Not open for further replies.

refulgent

IS-IT--Management
Jun 12, 2001
24
US
Hi guys,

Whenever I try to compile and run simple hello world program, it compiles fine but when i rty to run it it gives me this error:
Exception in thread "main" java.lang.NoClassDefFoundError

However when I set my classpath to blank it compiles and runs fine. But the problem is that whenever I add something to my classpath it stops running. Please let me know if you have any suggestions/comments why it happens and how to fix it.

I really appreciate your feedback,

Refulgent
 
Keep in mind that when you clear your classpath you are including the current working directory by default. However, when you set you classpath you are removing that default. I would suggest when setting the classpath to always include the current working directory. Or, in other words, always include . in your classpath.

-gc "I don't look busy because I did it right the first time."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top