• 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

exception in main thread

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello ranchers,
I have installed jdk5.0 in my system, and i have set the class path and path in the environment variables but when i run my application i get the class not found exception and exception in main thread exception. i need to know the information urgent please reply me as soon as possible.

Thanking you,
bye
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please post the exact error message you are getting.

If the NoClassDefFoundError shows "/class" at the end of it, then you are typing ".class" when you invoke java from the command line. Leave off the .class extension and it should work fine.

If there is not a "/class" at the end of it, then it could be your CLASSPATH. You probably should not have a system CLASSPATH set at all. If you do, then it should include a dot (.) for the current directory. To verify whether this is the problem, try running with a classpath flag for the current directory (java, space, -cp, space, period, space, filename without extension)...

java -cp . MyFile
 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Be care of the captial and lower case, when confuse, maybe will led such error.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic