Ensure the Java SDK is installed
- This is an optional step; if necessary, review: https://raybishun.com/2019/12/30/how-to-install-the-java-development-kit-on-windows-10/
Download/upgrade to the latest version of Visual Studio Code
Install the Java Extension Pack
The Java Extension Pack is a collection of popular extensions that can help write, test and debug Java applications in Visual Studio Code. Check out Java in VS Code to get started.
Extensions Included
By installing Java Extension Pack, the following extensions are installed:
- Language Support for Java™ by Red Hat
- Code Navigation
- Auto Completion
- Refactoring
- Code Snippets
- 📦 Debugger for Java
- Debugging
- 📦 Java Test Runner
- Run & Debug JUnit/TestNG Test Cases
- 📦 Maven for Java
- Project Scaffolding
- Custom Goals
- 📦 Java Dependency Viewer
- View Java projects, referenced libraries, resource files, packages, classes, and class members
- 📦 Visual Studio IntelliCode
- AI-assisted development
- Completion list ranked by AI
Create and run a sample app
/**
* HelloWorld
*/
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}