aspose file tools*
The moose likes Beginning Java and the fly likes exception in main thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "exception in main thread" Watch "exception in main thread" New topic
Author

exception in main thread

Arajeshh Kumara
Greenhorn

Joined: Dec 29, 2007
Posts: 12
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
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

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


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Austin Lee
Ranch Hand

Joined: Feb 18, 2008
Posts: 56
Be care of the captial and lower case, when confuse, maybe will led such error.
 
wood burning stoves
 
subject: exception in main thread