Eclipse Installation
1. Download jdk from sun.com
2. Install jdk
For I am using Vista, jdk is installed in C:/Programme File/Java/jdk
3. Set Path
Set system enviroment variable add " C:/Programme File/Java/jdk/bin" to Path
4. Try in command javac, if the usage is showed, it has gone OK.
But when I runned the hellowworld in command, it is OK.
But in Eclipse, it seems to be wrong with error in the Console window:
java.lang.NoClassDefFoundError: v1ch02/Welcome/Welcome
Caused by: java.lang.ClassNotFoundException: v1ch02.Welcome.Welcome
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Till now I cannot figure out what is wrong.
Finally, I have found the problem.
Eclipse has a default JRE named jre6 under java project, maybe the jdk you install is not the same version as the default, when you run your programme such error will occur.
The Solution is:
1. Change the JRE Directory
Window->Preferences->Java->Installed JREs->Add->JRE name:jdk-[version];JRE home directory:C:/Java/jdk
2. Add your file to src default package
Right Click your project->Build Path->Configure Build Path->Add Folder
3. Add Alternative JRE
Right Click your project->Build Path->Add Library->JRE System Library->Alternative JRE:your jdk
In the process of solving this problem, I have found a page explained well about the configuration of java dev-platform
http://www.cnblogs.com/pricks/archive/2009/05/28/1491392.html
But I cannot figure the tomcat, to reach http://localhost:8080
->In the End, I found the problem is that the Mcafee block that, but I have no access to change the config of Mcafee.
I decide to abandon this try. But all was right with the other computer which I have the totally admin priviledge.