Home > Development Tools > VSCode > Configuration method of Java development environment in VSCode

Configuration method of Java development environment in VSCode

青灯夜游
Release: 2021-01-07 10:29:06
forward
12927 people have browsed it

How to set up a Java development environment in

vscode? The following article will introduce to you how to configure the Java development environment with VSCode. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

Configuration method of Java development environment in VSCode

Related recommendations: "vscode tutorial"

Configuring Java development environment

Mainly refer to the official tutorial: https ://code.visualstudio.com/docs/java/java-tutorial

1. Install JDK first

JDK download address: https://www.oracle.com/java/technologies /javase-downloads.html

2. Configuration variables

Configure JAVA environment variables: Reference https://www.cnblogs.com/happyAzhan/p /11271274.html;

3. Install Java Extension Pack

This Java Extension Pack is an integration of 6 extensions. You only need to install this one, which is very convenient.

Directly click the link: https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack or install it in the VScode extension

and you will be prompted:

Just choose to open it. Then just click install in VS Code.

3. Configure the jdk version of VS Code

Type in the VS Code interface: Ctrl Shift P, then enter: Java: Configure Java Runtime
As shown below:

Fill in the jdk path here

4. Start writing the Java program: Hello, world!

Then F5 can be run.

Naturally there will be the desired output.
If there is no output or an error is reported:
1) Confirm whether you have installed Java Extension Pack
2) Enter in the terminal below: java -versionConfirm Check if jdk is installed.

Remarks:

Press simultaneously on the VS Code interface: Ctrl Shift P, and then enter: Java: Getting Started You can see some tips about java development (shortcut keys and the like are still very friendly).

For more programming-related knowledge, please visit: Introduction to Programming! !

The above is the detailed content of Configuration method of Java development environment in VSCode. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:cnblogs.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template