1.JDK Installation
Download JDK 5.0 Update 5: This includes the JRE execution environment and the JDK development environment, and the version will be updated continuously, so it may be different. After entering, you must select Accept to download.
Then select the installed operating system, sequentially windows,linux,solaris ... such as
Install after download (recommended for installation in C:\Java)
2. Set System variables (for Windows)
"New" in system variables, where "variable name" is set to java_home,"variable value" set to the JDK folder under the directory you just installed (for example: C:\Java\jdk1.5.0_05)
Then, in the original "system variables" to find path"edit", the "variable value" at the top of the Add.; %java_home%\bin; (Note that there is a point in the front, the semicolon should not be missed) so it is done.
3. Testing
Under "Command prompt character", hit the Java command, if not appear can not find the instruction, and then the program to test directly.
Copy the following program code into Notepad and save it as Helloworld.java (the file name must be exactly the same because Java is case-sensitive and the file can exist first C: \)
public class HelloWorld {
public static void Main (String args[]) {
System.out.println ("Hello world!");
}
}
Next, under Command prompt character, enter the following instruction
(Switch to the directory where the file is located, for example, C \)
(compilation) Javac Helloworld.java
(Compile OK will produce helloworld.class files)
(execute) Java HelloWorld
Display Hello World!!
So the Java development environment is complete.
Installation and setting of Java development environment