Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure Java development environment in VSCode

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you how to configure the Java development environment in VSCode, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Configure the 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

two。 Configuration variable

Configure JAVA environment variables: refer to https://www.cnblogs.com/happyAzhan/p/11271274.html

3. Install Java Extension Pack

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

Click the link directly: https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack or install it at the VScode extension

Then you will be prompted:

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

3. Configure the jdk version of VS Code

Type: Ctrl+Shift+P in the VS Code interface, and then type: Java: Configure Java Runtime

As shown below:

Fill in the jdk path here

4. Start writing Java programs: Hello,world!

Then F5 will be ready to 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 terminal below: java-version to confirm whether jdk is installed.

Note:

Press: Ctrl+Shift+P at the same time in the VS Code interface, and then type: Java: Getting Started to see some hints about java development (keyboard shortcuts and so on, very friendly).

These are all the contents of the article "how to configure the Java development environment in VSCode". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report