I would like help from all the Java Gurus out there. Recently , I tried to run my java code and though it compiles fine when running it gives me an error saying "Exception in thread "main" java.lang.NoClassDefFoundError: Hello... I have checked my path and it is correct and actually I had not done anything to the computer before and it was running before. I wonder if ther is anything that I had missed out or if I am over looking something. PLEASE HELP...THANKS TO EVERYONE
Your classpath is not set to include the directory that your Hello.class file is in. Do a search for classpath (see below the 2 buttons above) and you will find zillions of threads on classpath.
"JavaRanch, where the deer and the Certified play" - David O'Meara
Joined: Sep 29, 2000
Oh yeah, Jitty- Please change your name to be compliant with JavaRanch's naming policy. Your ID should be 2 separate names with more than 1 letter each. It should not be obviously fictitious. We really want this to be a professional forum and would prefer that you use your REAL name. Thanks, Cindy
[This message has been edited by Cindy Glass (edited September 24, 2001).]
The classpath does not include the class which you are trying to run.i.e, If you are in c:\ and compiled in the same directory and your classpath is ../jdk1.2/bin Then it won't find the class and give the error
It sounds like you do not have a main method in the class you are trying to run. Do you have a main method? OR Are you using a class that requires to be imported and failed to do so. Check your import statments.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com