• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NoClassDefFoundError

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx a lot. It worked.
 
Water proof donuts! Eat them while reading this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic