Although this is very simple for many people, I still want to write it down, hoping to help latecomers who are still in need.
I remember that I configured it for a long time when I first configured the JDK, and now every time I need to reconfigure the JDK myself, I have to read the corresponding article to recall it, so that I can complete it.
As the JDK configuration is too much, I gradually become familiar with it.
Beginners of JAVA may have doubts about the download of JDK. After all, JAVA has been developing continuously over the years.
According to the instructions on some old textbooks based on JDK1.5 and even JDK1.6, you can't find the download place at all.
After searching for JAVA's official website for a long time, I can only find the version of JDK1.7. In fact, JDK1.7 is completely free and is backward compatible with all JDKs.
As for the JDK1.8 recommended by the official website, don’t download it randomly. The author once made a JDK1.8 under an XP system, but found that it was impossible to use it...
1. Download of JDK
1. First, open the official website of JDK (click to open the link), find the JDK in JAVA SE 7u71/72, and select Download
2. Then, as shown in the figure below, select Accept License Agreement, and select the corresponding JDK download according to your operating system version.
3. Take Windows as an example. After downloading, you can get a runnable exe file and click Run directly.
2. Download JDK
1. Click Next. If your downloaded JDK has been updated, it doesn't matter. It's similar.
2. The installation path of JDK can be changed by "installing to" part. Please check whether the installation paths of "development tools", "source code", and "public JRE" have been changed. This is not like Mysql. You can change all the following items.
3. Click next to automatically complete the installation of JDK, and then install JRE. If your previous JDK has changed, it is best to change the JRE here to the same root directory as JDK. For example, my JDK is installed in D:/java/jdk, and your JRE here is also best to install D:/java/jre, so that it is convenient for your file management.
4. Click next to complete the installation of the entire JDK
3. JDK deployment
1. Right-click "Computer" -> "Properties", then select the "Advanced" tab of "Advanced System Settings", then select "Environment Variables", and the XP system is "My Computer" -> "Properties", then you can directly select the "Advanced" tab page, then select "Environment Variables"
The above is a screenshot of the WIN7 system, and the following is a screenshot of the XP system
2. Select "Create" (W) in "Environment Variable"...
3. Then, create three new system variables in the pop-up window:
JAVA_HOME
E:/Program Files/Java/jdk1.7.0_71 (This is the JDK installation path you chose when you installed it just now)
CLASSPATH
.;%JAVA_HOME%/lib;%JAVA_HOME%/lib/tools.jar;
Path
%JAVA_HOME%/bin;%JAVA_HOME%/jre/bin; (If your JRE selects another path, the first semicolon should be the path of.../Jre/Bin)
For example, the following figure is to create a new environment variable of CLASSPATH, click "OK" and then create another new one
4. After you have done it, click "OK" on each interface, then open the "Command Prompt", or enter "cmd" in the run window, open the DOS interface, enter java and javac in it, and can output a bunch of debugging information, which proves that your machine already has a JAVA running environment, and the download, installation and deployment of JDK are officially completed.
The above is all the content of this article. I hope it will be helpful to everyone's learning and I hope everyone will support Wulin.com more.