To learn how to install JDK on win7, first install JDK. The following is a summary of the problems I encountered when installing JDK, mainly the setting of environment variables. 1. first, download the JDK installation package on the official website and follow the normal steps to install it (here we will not introduce the specific installation steps) 2. configure environment variables: (I will first introduce the steps I started, follow the steps in the book, but the result is failed) (1) set the environment variable JAVA_HOME to your JAVA installation Path. The Path contains folders such as bin and jre. (2) set the Path of the system variable. Add it directly after the original variable; % JAVA_HOME % \ bin; % JAVA_HOME % \ jre \ bin;
(3) Verification: Enter cmd at Start> run, and then enter javac. This command is not displayed -----> Configuration failed! Www.2cto.com then I used the following method: (1) set the Path: add the full JDK installation path directly after the original variable (add \ bin to the JAVA_HOME path you set), that is, C: \ program files \ JAVA \ jre1.0/21 \ bin; (2) Verification: successful! Note: The bin folder under the JDK installation path contains related commands run under cmd, such as java, javac, and java-version, so we need to add the Path of these commands to the Path system variable. If you delete the original Path variable, you always enter the ping command in cmd and it will display "No such command "! Therefore, if you want to run any command in cmd, you must add the Path of this command to the Path of the system variable.