提前的错误
|
----------------解决方案--------------------------------------------------------
[QUOTE] ErrorExplanation
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp
If you receive this error, java
cannot find your bytecode file,HelloWorldApp.class
.One of the places java
tries to find your bytecode file isyour current directory. So, if your bytecode file is in C:\java
,you should change your current directory to that. To change your directory,type the following command at the prompt and press Enter:The prompt should change tocd c:\java
C:\java>
. If you enter dir
at the prompt, you should see your .java
and .class
files.Now enter java HelloWorldApp
again.If you still have problems, you might have to change your CLASSPATHvariable. To see if this is necessary, try "clobbering" the classpath withthe following command:Now enterset CLASSPATH=
java HelloWorldApp
again. If the program works now,you'll have to change your CLASSPATH variable. For more information, consultthe section 5. Update the PATH variable in the installation instructions.
[/QUOTE]
下面那个网页你也可以看一下
http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32 ----------------解决方案--------------------------------------------------------