Start learning Java recently, starting with the first step. Installing the JDK in Win7 is simple, so don't spray it.
1. Download the JDK and perform the installation.
Visit the website www.java.com and select the Win7 version of the JDK download. Double-click Install after download (slow, patient wait).
Note that the default directory for the installation is c:\ProgramFiles\java\ ... and the default pathname with spaces is not recommended. Delete the Program Files section.
2. Setting Environment variables
An environment variable is a list of directories that the operating system searches for a local executable file, and if the input Java command under DOS is prompted to be "' xxx ' is not an internal or external command ..." then it is because the environment variable is not set.
Right-click the environment variable, advanced system settings, properties, computer, and enter the environment variable Settings window.
- Create a new "java_home" variable in the system variable with a value of the installation directory in step 1, such as "C:\java\jdk1.8.0_60" .
- Create a new "classpath" variable in the system variable with the variable value: ".; %java_home%\lib;%java_home\lib\tools.jar ".
- Locate the system variable "path" and in the edit the variable add the following: "%java_home%\bin;%java_home%\jre\bin". (each variable value is separated by a semicolon ";") Separated).
3. Testing
Enter "Java-version" in cmd if prompted, it indicates that the installation configuration was successful.
Java Learning 01:win7 Environment installation JDK