Recently about the JDK encountered a big problem, my computer is installed 1.7, the company's project ran 1.6, and then run the project will always make some inexplicable error, error has compile hints.
Here is a general look at the installation of jdk1.6 and some of my personal understanding:
First, step:
1, download the JDK installation package, note that the installation package, such as Jdk_1.6_windows_x64.exe, double-click to install.
And our company because of the use of software security requirements are relatively high, are directly from the company's software library to copy the installed version. The installed directory looks like this:
2. Configure the JDK environment variables, including Java_home, Path, classpath. The following are examples of the JDK on my computer, respectively.
Java_home:c:\program files\java\jdk1.8.0_60;
Path:%java_home%\bin;%java_home%\jre\bin;
Classpath:.; %java_home%\lib;%java_home%\lib\tools.jar;
3. Enter cmd and enter the Linux command java-version to see if the installation was successful. The installation is like this:
JDK Path configuration for 4,eclipse
Select directory: Java->installed jres, Windows-perferences (I don't understand why this is the JRE), add the installed JDK to the right.
Tomcat:windows-perferences->add Tomcat or edit existing tomcat, re-select the JRE version.
5, the problem is not resolved:
I've seen some articles saying that the JDK comes with the JRE, and the JRE exists in the installed JDK folder, but there are also some separate JRE to see.
Not quite sure what the JRE is all about, and what the difference between the JRE and JDK should be.
Old See some articles said, have time to look at the JDK inside the code, a cursory look at the code where not found, and do not know how to use the way to learn the code, after all, looking at the code is a very boring thing.
---restore content ends---
Installation and path configuration for jdk1.6