How to write java in VS Code
How to write Java in vscode: First download VSCode and install and run it; then click the extension icon on the left side of the interface to install the JDK and configure environment variables; then install the Java extension and open a Java code file; finally right-click the editing window , and select "Run Code".
In many cases, I just want to write a very simple Java program with only a few lines of code and see the results. Although Visual Studio / Eclipse / IntelliJ IDEA is powerful, it is too heavy and feels like overkill when used.
Recommended course: Java Tutorial.
Now there is an additional option, which is to use Visual Studio Code (VS Code), a powerful text editor launched by Microsoft. You can take a look at the effect first:
First of all, there must be some prerequisites
Download VS Code and install it, run VS Code, click on the on the left Extension
icon,
Then search for and install the following extension:
Steps required to run Java code
Install the latest version of JDK and JRE (download page) Configure Java system path parameters (refer to this article for the method, where the JDK installation path should be set according to the actual installation path)
After the installation is complete, enter java -version
and javac -version
in the command prompt or PowerShell. If the correct Java version number is displayed, it means that the previous The configuration is already correct. Search and install the following extensions in VS Code
Open a Java code file, right-click the editing window, and select Run Code
, the program running results will be displayed in the Terminal
window. When writing a program using a new file, you need to click the
Plain Text
button in the lower right corner or press Ctrl K
→M
), select the language as Java.
Now you can write Java programs in it.
The above is the detailed content of How to write java in VS Code. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Visual Studio Code, most commonly known as VSCode, is one of the tools used by developers for coding. Intellisense is a feature included in VSCode that makes coders’ lives easy. It provides suggestions or tool tips for writing code. This is the kind of extension that developers prefer. People who are used to IntelliSense will find it difficult to code when it doesn't work. Are you one of them? If so, go through this article to find different solutions to fix IntelliSense not working in VS Code. Intellisense is shown below. It provides suggestions as you code. Check first

Switching the UI interface to Chinese in Visual Studio Code (hereinafter referred to as VSCode) is not a complicated matter. Just follow the following steps to achieve it easily. VSCode is a powerful and popular code editor that supports a variety of programming languages and tools. It has a friendly and flexible interface to meet the diverse needs of developers. The following will introduce the techniques on how to quickly switch to the Chinese interface in VSCode, with specific code examples to facilitate everyone's operation. Step 1: Open

In the process of learning and using Vue3, choosing the right development tools is a very important step. This article will introduce several essential development tools for beginners to help you develop Vue3 more efficiently and accurately. VisualStudioCodeVisualStudioCode is a free, open source lightweight code editor. It supports multiple programming languages and has powerful extension functions. For Vue3 development, VisualStudioC

With the rapid development of information technology, programming has become an indispensable part of people's daily lives. In the programming process, a good integrated development environment (IDE) can greatly improve development efficiency. Visual Studio Code (VSCode for short), as a powerful open source code editor, has been welcomed by a wide range of developers. This article will show you step by step how to set the language of VSCode to Chinese to make your programming experience smoother. Step 1: Open VSCode

VSCode is a lightweight code editor suitable for multiple languages and extensions; VisualStudio is a powerful IDE mainly used for .NET development. 1.VSCode is based on Electron, supports cross-platform, and uses the Monaco editor. 2. VisualStudio uses Microsoft's independent technology stack to integrate debugging and compiler. 3.VSCode is suitable for simple tasks, and VisualStudio is suitable for large projects.

Python is widely used, and its simplicity, ease of learning and efficient coding attract more and more developers. As a popular text editor, VSCode is also widely used, and it also has many optimizations for Python. In this article, we will introduce some techniques used by VSCode in Python to make your coding more efficient. Shortcut Keys VSCode has many built-in shortcut keys that can help you speed up your coding. When you use the Python editor to compile

Title: How to set the interface language to Chinese in VSCode? Visual Studio Code (VSCode for short) is a very popular open source code editor that supports many different programming languages and interface languages, including Chinese. Setting the interface language of VSCode to Chinese can provide users with a more comfortable development environment. This article will introduce how to set the interface language to Chinese in VSCode and provide specific code examples.

Go language IDE overview: Which IDE can help you get twice the result with half the effort? Introduction: With the popularity of Go (or Golang) language, more and more developers are looking for an efficient Go language IDE to improve development efficiency. This article will introduce several common Go language IDEs and give a comparative analysis to help readers be more clear when choosing an IDE. GoLandGoLand is a powerful Go language IDE developed by the JetBrains team. It provides comprehensive Go language support, including
