This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NoClassDefFoundError

 
N Nanda
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All...
I am using Java1.4 on Windows 2000 server. Everything was working fine till somedays ago. But now when I am trying to run even a simple "Hello World" java program, its showing error like
Exception in Thread "main" java.lang.NoClassDefFoundError
Please help as soon as possible.Thanx in advance.
Niranjan Nanda
 
Sheeba lalith
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
This is because you may have missed out the entry for current directory in your classpath. CLASSPATH variable looks for all the locations you specified part of the classpath for locating the class files.
Just type set to see the list of environment variable settings and look for the entry classpath.If it doesn't contain the entry for the current directory(hoping you are executing the application from the directory having the class files.),set the classpath at the prompt as follows:
set classpath=%classpath%;.
If this is OK,then u need to look at the file name.When you interpret the application ,you should give the same name that you specified while naming the class,in the correct case.

Hope this helps.
Thanks,
lsheebs



set classpath=%classpath%;.
 
N Nanda
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx a lot. It worked.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic