Download and install the JDK
JDK download link, go to the official website to download my point
Need to find your own version, I am here to download the version 8
Into the download page to download your own version of the system. I have a Windows 64-bit systems
This download may need to log about the account, should not, then register it.
Once downloaded directly click on it to make it the default installation
Continue to click Next to make it the default installation, the installation location can not change
Then later on completion of window closed
Let's verify jdk have not successfully installed, the shortcut key Win + R to open the search box, enter cmd, enter the java command in the dos command will pop up a lot of introduction to the command. This explains successfully installed the jdk, as shown:
Next we try to enter javac command in the current directory, this is our instruction to compile java files
javac directive also does not take, it can perform how we want to do in any catalog? This time we need to configure the environment variables
java environment variable configuration (Text Version)
Our right-click My Computer> Properties> Advanced System Settings> Environment Variables
Inside, we can see the following interface. We are concerned with the "System Variables"
Create a system variable called JAVA_HOME, variable value of your jdk installation directory, the installation directory to find you, I is C: \ Program Files \ Java \ jdk1.8.0_221
Then determine
Version is not the same thing, jdk file name is not the same, do not blindly copy me suggest that you look for yourself
After adding JAVA_HOME environment variable, and then my door configuration Path environment variable. After selecting Path variable, and click Edit
win10 should I see this interface, we continue to click New
Create a new% JAVA_HOME% \ bin on it, OK
Let's verify there are no environmental variables configured, open cmd window enter javac command to see:
Have configured a success!
Additional information:
There is one interphase of the case is this:
Only you need to add the forefront in the value of the variable% JAVA_HOME% \ bin;
This must use; separated No.
java environment variable configuration (full text Starter Edition)
Right-click on My Computer> Properties> Advanced System Settings> Environment Variables
1, a new system variable
变量名为 JAVA_HOME
变量值为你jdk的安装目录,我的是C:\Program Files\Java\jdk1.8.0_221
2、配置Path环境变量
在Path中添加一个变量值 %JAVA_HOME%\bin
完成!