The first step to learning Java development is to build a development environment. The following describes how to install and configure JDK on Windows XP:
Step 1: Download JDK
Download JDK 6 or later from the sun website. Here we take the jdk-6u2-windows-i589-p version as an example.
Step 2: Install JDK
(1): double-click the jdk-6u2-windows-i589-p.exe file, here we install path: D:/common/Java
(2) After the installation is complete, the JDK folder includes:
D:/common/Java/jdk1.6.0 _ 02: indicates the JDK installation path;
Bin: Short for binary, which stores various Java executable files;
DB: the newly added Apache Derby database in JDK 6, which supports the jdbc4.0 specification;
Include: Some header files to be introduced, mainly C and C ++. JDK itself is implemented through C and C ++;
JRE: Java Runtime Environment;
Lib: Short for library. Some resource files and resource packages required by JDK.
Step 3: Configure Environment Variables
After the installation is complete, you must configure the Java environment for normal use. The steps are as follows:
(1): Right-click on my computer --> select properties,
(2): On the pop-up page, select Advanced --> environment variable,
(3) Find the "path" option in the system variable and double-click it. On the displayed page, add the following statement "D" at the beginning of the variable value: /common/Java/jdk1.6.0 _ 02/bin; ". Do not forget the semicolon next to it,
(4): click "OK" on the Edit System variables page, and then click "new" on the environment variables page ",
(5) enter the variable name java_home and the variable value is D:/common/Java/jdk1.6.0 _ 02. Pay attention to the semicolon.
(6): click "OK" on the new system variables page, and then click "new" on the environment variables page to bring up the "New System variables" Page. Enter the variable name "classpath" on the page, variable value :.;, note that the dot and semicolon are used.
(7): Click OK to complete the settings.
So why should we set these environment variables? How can we set them:
Path: provides the operating system with the path to find the Java command tool. It is usually configured to the JDK installation path/bin, such as: D:/common/Java/jdk1.6.0 _ 02/bin ;.
Java_home: It is provided for other Java-based programs so that they can find the JDK location. Usually configure the JDK installation path, such as: D:/common/Java/jdk1.6.0 _ 02 ;. Note: java_home must be correctly written, in uppercase, and underlined in the middle.
Classpath: the path that the provider looks for resources at runtime, such as classes, files, and images.
Note: In Windows, it is best to keep ".;" in the classpath configuration, and "." In Windows indicates the current path.
Step 4: Check whether the installation configuration is successful
After completing the above steps, the basic installation and configuration are fine. How can I know if the installation is successful?
Click Start> click Run. In the displayed dialog box, enter "cmd" and click OK. In the displayed DOS window, enter "javac" and press Enter, if the following interface is displayed, the configuration is successfully installed.
Jdk1.6 official download _ jdk6 official: http://www.java.net/download/jdk6/6u10/promoted/b32/binaries/jdk-6u10-rc2-bin-b32-windows-i586-p-12_sep_2008.exe
Download jdk6 api chm Chinese reference:
Jdk6apichinese reference 070114.rar: http://chinesedocument.com/upimg/soft/jdk6apichinese reference 070114.rar
Java SE 6 API Chinese CHM download: http://download.java.net/jdk/jdk-api-localizations/jdk-api-zh-cn/publish/1.6.0/chm/JDK_API_1_6_zh_CN.CHM
Java SE 5 API Chinese CHM download: http://download.java.net/jdk/jdk-api-localizations/jdk-api-zh-cn/builds/JDK_API_1_5_zh_CN.CHM
Download the jdk6 API Chinese version:
Https://jdk-api-zh-cn.dev.java.net/ Jdk6 API Chinese Version HTML format online documentation: http://download.java.net/jdk/jdk-api-localizations/jdk-api-zh-cn/builds/latest/html/zh_CN/api/ Jdk6 API Chinese Version ZIP format download: http://download.java.net/jdk/jdk-api-localizations/jdk-api-zh-cn/builds/latest/html_zh_CN.zip JDK 1.6 API: Sun official API Chinese version [jdk1.6] 1.6api documentation (Chinese:ZIP Format: http://download.java.net/jdk/jdk-api-localizations/jdk-api-zh-cn/publish/1.6.0/html_zh_CN.zip CHM format: http://download.java.net/jdk/jdk-api-localizations/jdk-api-zh-cn/publish/1.6.0/chm/JDK_API_1_6_zh_CN.CHM |