Article directory
Probably just a few steps, download jdk-add jdk to environment variables-vscode install related plug-ins
jdk download
Download this file
Link: https://pan.baidu.com/s/1asQ9Owtf1fDKvZYGg2CXZg
Extraction code:
After c1fv is downloaded, click on this .exe file, and the following page will pop up:
Keep clicking Next, when selecting the jdk download path, It is recommended not to change it, so that the system will default to C:\Program Files
this location on the C drive, and it will be easy to find in the future.
Add java to environment variables
Go to the folder where you downloaded jdk just now. If the path has not been modified, it will be in C:\Program Files
this folder by default.
Click to enter, there will be a Java
folder called , click to open,
and then fill in the address of the bin folder into the environment variable.
The default address is: as C:\Program Files\Java\jdk1.8.0_74\bin
shown in the picture:
like this, it will be fine.
vscode plugin download
There are quite a few plug-ins to download. The easiest way is to add a .java
file, and the program will pop up a prompt to install the Java Extension Pack. Just click on it.
After all the downloads are complete, restart vscode and write this code in the file
you just created .java
:
public class Hello {
public static void main(String[] args) {
System.out.println("Hello world");
}
}
Just run it successfully