Download JDK and set up java development environment variables
JDK (java development<developer>kit) development environment. jdk contains the running environment jre,
Download address: http://www.oracle.com/technetwork/java/javase/downloads/index.html
According to your computer needs, choose the appropriate version, such as Windows 64-bit system,
You need to choose windows x86
In order to facilitate the execution of java commands at any location, you need to configure environment variables
After downloading and installing the JDK, start configuring the environment variables
1. Right-click My Computer and select Properties
2. Open the Advanced System Settings option and click Environment Variables in the Advanced Options
3. Set three properties in the system variable, java_home path classpath
First set JAVA_HOME:
Just write the installation location of your own JDK
For example, if the JDK is installed in the C:\jdk1.6.0 directory, set JAVA_HOME as the directory path,
Note: The name java_home cannot have any changes
Because everyone's jdk installation path can't be exactly the same, when you need to use other people's jdk development environment, you only need to change the variable value of java_home, otherwise, you need to change any reference with absolute path.
If the documents in the jdk directory are not changed completely, or the directory cannot be found, a program cannot find the JDK, and the consequence will cause the system to crash!
path variable
Assuming that our JDK is installed in the C:\jdk1.6.0 directory, then in the C:\jdk1.6.0\bin directory is our commonly used java c application, we need to put the C:\jdk1.6.0\bin directory Add it to the path environment variable.
classpath variable
classpath=.;C:\jdk1.6.0\lib\tools.jar;C:\jdk1.6.0\lib\dt.jar
The classpath environment variable is to let the java interpreter know where to find this class when we need to refer to a class written by others when developing a java program. (This explanation was found on the Internet, and I don't understand it very well. After all, I don't understand the "class" very well.)
4. After configuring the environment variables, test whether the JDK is installed successfully: press windows+R, enter cmd, and then enter the javac java -version command
think:
For today's knowledge, I don't think I understand it very well, because some concepts are very vague. For example, when the teacher explained why java_home was used at the beginning, I didn't understand it very well, and I was still at the top of my head at that time. Ask why you can't change java_home, and learn the dos command. Some commands are used by themselves, but they still don't know how to write them. I feel that some knowledge still needs to be further explored by myself, because there are many concepts that are still the same. A feeling of incomprehension.