VSCode configures the Java environment and records the configuration successfully | Windows

Table of contents

1 Configure the computer Java environment

1.1 Download jdk:

 1.2 Configure environment variables

1.3 Test the Java environment

 2. Create a Java project in vscode

2.1 Create a project root directory

2.2 Configure plug-ins

 2.3 Create a Java project


1 Configure the computer Java environment

1.1 Download jdk:

​​​​​​Java Download | Official Website

 After downloading, double-click to run the software. The installation location can be customized. I created a new folder here and installed it on the D drive. Remember this installation path.

 1.2 Configure environment variables

Right click on computer properties and select advanced system design

 Click on Environment Variables

Click the path in the system variable to add a path, find the folder of your Java installation path, and add the bin folder path to it

Then click OK in turn, each interface must click OK 

1.3 Test the Java environment

Open the cmd window and enter Java. If there are any of the following conditions, it means that the configuration has been successful. One of the two is enough.

 

 2. Create a Java project in vscode

2.1 Create a project root directory

First create a folder and open it in vscode

2.2 Configure plug-ins

Download the plug-in as shown below

If you have not downloaded code-runner, you can also install the following plug-in, which is used to run the code

 2.3 Create a Java project

CTRL+shift+P Enter java create

Choose no build

 Then select the project location

 Next, just enter a project name, and click Enter after entering.

 Such a hello project is created

Guess you like

Origin blog.csdn.net/weixin_63676550/article/details/131495774