JDK installation and setting

xiaoxiao2021-03-06  49

Title: Java Development Environment Installation and Configuration Time: 2005-2-24 .................................................................................................................. ..........

◇ Get J2SDK installation file ◇ Install J2SDK ◇ Configure environment variables ◇ Test

First, get J2SDK installation files

1, enter http://java.sun.com/downloads/index.html website

2. Select Java 2 Platform, Standard Edition (J2SE) to download.

3. Enter the corresponding download page. Example: http://java.sun.com/j2se/1.5.0/download.jsp

4, download JDK and the corresponding document. Note: JDK-Doc documentation in CHM format download website: http://www.allimant.org/javadoc/indexe.html II, installation J2SDK

1. Run the J2SDK installation file J2SDK-1_5_0_01-windows-i586-p.exe, in the pop-up installation wizard, all the way [Next], [Yes], [Finish], etc., until the installation is complete. Note: In order to facilitate management I have established a Java subdirectory in the C drive. Install J2SDK under C: / Java / JDK.

Third, configure environment variables

1. Environment variables that need to be set include: Java_Home, Path, ClassPath.

2, Method: Right-click on the desktop, click Select [Properties] in the right-click menu display, then select [Advanced] | [Environment Variable] in the "System Properties" window pop-up. The pop-up environment variable window selects [(User Variable) New "], add environment variables twice to Java_Home, Path, and ClassPath, as shown in Figure E01-14: Figure E01-14 Environment Variable Settings interface, assume the J2SDK installation The actual installation path is "C: / Java / JDK". New environment variables can also be added to the system variable so that this environment variable can be used in any user login, otherwise it can only be logged in as the particular user. Use. You can also open the System Features window by [Start] → [Settings] → [Control Panel] → [System]]

3, the value of environment variables:

Java_Home: C: / Java / JDK

PATH:% java_home% / bin

Classpath:.;% Java_home% / lib / dt.jar;% java_home% / lib / Tools.jar

Fourth, test

1. Start the command line window.

2. Run the Javac, Java command in the command line window, if multi-line prompt information (as shown in Figure E01-15), the J2SDK installation and environment variable configuration are correct. Otherwise, the system will prompt the unrecognizable command, for example: ◇ 'javac' is not internal or external command, nor is the runable program or batch file. ◇ 'Java' is not internal or external command, nor is it a running program or batch file. It should be re-configured, especially paying that the setting of the environment variable is incorrect. Success: Figure E01-15 javac command prompt information

转载请注明原文地址:https://www.9cbs.com/read-53929.html

New Post(0)