Exception in thread
Hi,
I am a novice that is planning to learn JAVA. I downloaded J2SDK1.4.2_12 and installed it on my computer that runs Windows XP Pro SP2.
Added the J2SDK\bin in the path environment variable.
I copied a sample program from a book Shuams outline.
class Hello {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
The program is savedin separate working directory other that of J2SDK's.
The code compiles with out an error.
when I run the program, the following error messge appeared:
"Exception in thread "main" java.lang.NoClassDefFoundError: Hello "
I could not get any help from any of the documents that I read.
Can any one help!
Thanks.
[769 byte] By [
ET3BTa] at [2007-10-3 3:28:12]

*sigh*
http://onesearch.sun.com/search/onesearch/index.jsp?qt=Exception+in+thread+%22main%22+java.lang.NoClassDefFoundError&subCat=siteforumid%3Ajava54&site=dev&dftab=siteforumid%3Ajava54&chooseCat=javaall&col=developer-forums
http://access1.sun.com/FAQSets/newtojavatechfaq.html#1
And I don't even want to fire up Google. And to your benefit, I won't look up the documentation of the Error to see whether it might name a cause, which I'm sure it will.
Did you run as > java Hello.java ?
No the exception would have said:
java.lang.NoClassDefFoundError: Hello/java
Need -cp ?
type in 'java' from the command prompt and check the arguments to the command 'java'.
Message was edited by:
abillconsl