Install and configure JDK for fun programming

jdk installation and configuration

download jdk

jdk1.8, also known as jdk8.0, is a relatively stable version at present. It is not recommended to download the latest jdk version, because the latest version of jdk is unstable, and various problems may occur in Java learning. There are two jdks installed in the author's computer, one is stable 8 and the other is 9 with interactive features. Here we can choose our own suitable ones.

Choose according to the configuration of your computer! I choose 64!
insert image description here

Download Portal
insert image description here
You can do both, as you are happy.

installation steps

If you read my post now, my suggestion is to keep it all the way. I think you must be a novice, and you will never make mistakes in fool-proof installation. As for which disk to put, my brother has a lot of space, so I will put the C disk, and asking is rebellious.

Be sure to remember your installation path, if you can't remember, then I will tell you!

The general default is C:\Program Files\Java

Configure environment variables

  1. Win key + R key, enter cmd, and click OK.
  2. then enter java
  3. Then you will find that you are a Shabe, and you have to configure it.
  4. Then configure it!

Right-click on "This PC", select Properties, select Advanced System Settings

insert image description here
Select the system variable, click New, enter the variable name JAVA_HOME, and the variable value is the path where the bin directory of the JDK is located. This directory up to the bin layer C:\Program Files\Java\jdk1.8.0_26 is like this.
Select System Variables, find the Path variable, and click Edit.
insert image description here

okok try it

insert image description here
Then run the code
insert image description here
insert image description here

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324175203&siteId=291194637