Table of Contents
Configuring Java development environment
1. Install JDK first
2. Configuration variables
3. Install Java Extension Pack
3. Configure the jdk version of VS Code
4. Start writing the Java program: Hello, world!
Home Development Tools VSCode Configuration method of Java development environment in VSCode

Configuration method of Java development environment in VSCode

Jan 07, 2021 am 10:29 AM
java vscode

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!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What computer configuration is required for vscode What computer configuration is required for vscode Apr 15, 2025 pm 09:48 PM

VS Code system requirements: Operating system: Windows 10 and above, macOS 10.12 and above, Linux distribution processor: minimum 1.6 GHz, recommended 2.0 GHz and above memory: minimum 512 MB, recommended 4 GB and above storage space: minimum 250 MB, recommended 1 GB and above other requirements: stable network connection, Xorg/Wayland (Linux)

How to define header files for vscode How to define header files for vscode Apr 15, 2025 pm 09:09 PM

How to define header files using Visual Studio Code? Create a header file and declare symbols in the header file using the .h or .hpp suffix name (such as classes, functions, variables) Compile the program using the #include directive to include the header file in the source file. The header file will be included and the declared symbols are available.

PHP vs. Python: Use Cases and Applications PHP vs. Python: Use Cases and Applications Apr 17, 2025 am 12:23 AM

PHP is suitable for web development and content management systems, and Python is suitable for data science, machine learning and automation scripts. 1.PHP performs well in building fast and scalable websites and applications and is commonly used in CMS such as WordPress. 2. Python has performed outstandingly in the fields of data science and machine learning, with rich libraries such as NumPy and TensorFlow.

How to switch Chinese mode with vscode How to switch Chinese mode with vscode Apr 15, 2025 pm 11:39 PM

VS Code To switch Chinese mode: Open the settings interface (Windows/Linux: Ctrl, macOS: Cmd,) Search for "Editor: Language" settings Select "Chinese" in the drop-down menu Save settings and restart VS Code

Common commands for vscode terminal Common commands for vscode terminal Apr 15, 2025 pm 10:06 PM

Common commands for VS Code terminals include: Clear the terminal screen (clear), list the current directory file (ls), change the current working directory (cd), print the current working directory path (pwd), create a new directory (mkdir), delete empty directory (rmdir), create a new file (touch) delete a file or directory (rm), copy a file or directory (cp), move or rename a file or directory (mv) display file content (cat) view file content and scroll (less) view file content only scroll down (more) display the first few lines of the file (head)

How to solve the problem of vscode Chinese annotations becoming question marks How to solve the problem of vscode Chinese annotations becoming question marks Apr 15, 2025 pm 11:36 PM

How to solve the problem that Chinese comments in Visual Studio Code become question marks: Check the file encoding and make sure it is "UTF-8 without BOM". Change the font to a font that supports Chinese characters, such as "Song Style" or "Microsoft Yahei". Reinstall the font. Enable Unicode support. Upgrade VSCode, restart the computer, and recreate the source file.

How to set vscode in Chinese How to set vscode in Chinese Apr 15, 2025 pm 09:27 PM

There are two ways to set up a Chinese language in Visual Studio Code: 1. Install the Chinese language package; 2. Modify the "locale" settings in the configuration file. Make sure Visual Studio Code version is 1.17 or higher.

vscode Previous Next Shortcut Key vscode Previous Next Shortcut Key Apr 15, 2025 pm 10:51 PM

VS Code One-step/Next step shortcut key usage: One-step (backward): Windows/Linux: Ctrl ←; macOS: Cmd ←Next step (forward): Windows/Linux: Ctrl →; macOS: Cmd →

See all articles