Java Extension Pack JDK Auto

The extension greatly reduces the installation, configuration effort, and JDK configuration errors for general Java developers. There is no need to manually install JDK, Gradle, or Maven or set environment variables such as path
. It also comes pre-included with extensions that most Java developers need, such as Spring, Lombok, and Tomcat start/stop, so you can start developing right out of the box with zero configuration.
Installation
Method 1: VSCode Web Marketplace
- Click Install on the Marketplace web page in web browser
- Click Install on README opened in VSCode
- Open Extensions sideBar (Ctrl/CMD + Shift + X) in VSCode
- Search for
jdk auto
- Click Install
Method 3: Quick Pick
- Open Quick Pick (Ctrl/CMD + P) in VSCode, paste the following command, and press enter.
ext install Pleiades.java-extension-pack-jdk
Method 4: Command Line
- Install from the command line.
code --install-extension Pleiades.java-extension-pack-jdk
Features
JDK Auto-configuration
The JDKs are auto-configured for the current environment on VSCode startup as follows. You can check the detected JDK in User settings.json described later or Output (Ctrl + Shift + U) ≫ Dropdown: JDK Auto
. If there are multiple JDKs of the same version, the latest minor version among them is used. If you manually install or update the JDK and want to force update the configuration of VSCode, restart VSCode or execute >Developer: Reload Window from the command palette (F1 or Ctrl/Cmd + Shift + P). These are applied as user (VSCode global) settings. You can manually change user settings, but if you want to customize your settings even further, consider using workspace settings or profiles.
- Auto-fix invalid JDK configuration path (e.g.
/jdk17/bin/java
-> /jdk17
)
- Auto-remove configuration entries when JDK uninstalled or version path changed
- Auto-scan from OS-specific location, SDKMAN, jEnv, jabba, ASDF, Gradle, Scoop, IntelliJ etc...
- Auto-detect environment variables
JAVA_HOME
, JDK_HOME
and PATH
- Auto-download Adoptium LTS JDKs and available latest non-LTS JDK if not installed
- Auto-update auto-downloaded JDKs to the latest version
(*1) The language server runtime used by VSCode extensions. Not for building and running projects.
(*2) The path
in the entry marked as default: true
in java.configuration.runtimes
.
Auto-download Support
If the extensions.autoUpdate configuration is NOT false
or does not exist locally, it will be downloaded. For Gradle and Maven, only the latest versions are automatically downloaded. If you are using a very old Java version, please set up gradlew (Compatibility) or mvnw (Compatibility) manually in your project.
- JDK - up to 4 LTSs and latest non-LTS if not detected
- Gradle - download if not on PATH environment
- Maven - download if not on PATH environment
JDK auto-download supports the following platforms:
- Windows x64
- macos x64, aarch64
- Linux x64, aarch64
It is saved in the following directory.
OS |
JDK Auto Extension global storage directory |
Windows |
%APPDATA%\Code\User\globalStorage\pleiades.java-extension-pack-jdk\ |
macos |
$HOME/Library/Application Support/Code/User/globalStorage/pleiades.java-extension-pack-jdk/ |
Linux |
$HOME/.config/Code/User/globalStorage/pleiades.java-extension-pack-jdk/ |
Command Palette >Preferences: Open User Settings (JSON)
// JDT Language Server
"java.jdt.ls.java.home": "c:\\Program Files\\java\\jdk-17.0.6",
// ST4 Language Server
"spring-boot.ls.java.home": "c:\\Program Files\\java\\jdk-17.0.6",
// Runtime Server Protocol Server (Not AP server VM)
"rsp-ui.rsp.java.home": "c:\\Program Files\\java\\jdk-17.0.6",
// Project Runtimes
"java.configuration.runtimes": [
{
"name": "JavaSE-1.8", // Adoptium (Auto-download)
"path": "c:\\Users\\<UserName>\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\8"
},
{
"name": "JavaSE-11", // Corretto (Auto-scan)
"path": "c:\\Program Files\\Amazon Corretto\\jdk11.0.18_10"
},
{
"name": "JavaSE-17", // Oracle (Auto-scan)
"path": "c:\\Program Files\\java\\jdk-17.0.6",
"default": true // for No build tools
},
{
"name": "JavaSE-18", // JAVA_HOME (Auto-detect)
"path": "d:\\jdk\\18"
},
{
"name": "JavaSE-19", // Adoptium (Auto-scan)
"path": "c:\\Program Files\\Eclipse Adoptium\\jdk-19.0.2.7-hotspot"
}
],
// Gradle Daemon
"java.import.gradle.java.home": "c:\\Program Files\\java\\jdk-17.0.6",
// Maven Environment Variables
"maven.terminal.customEnv": [
{
"environmentVariable": "JAVA_HOME",
"value": "c:\\Program Files\\java\\jdk-17.0.6"
}
],
Terminal Auto-configuration
Terminal profiles are defined based on configured runtimes, so you can easily open a terminal by selecting the Java version from command >Terminal: Create New Terminal (With Profile) or Terminal (Ctrl/Cmd + `) ≫ Profiles dropdown. The configured environment variables have no effect outside the terminal, so the system and OS user environment remain clean. The JAVA_HOME
and PATH
in the auto-configured terminal configuration will always be overridden from the configured runtimes, so if you want to customize it, copy the terminal configuration entry and create a new one.

A non-existent rcfile is specified so that JAVA_HOME and PATH are not overwritten at shell startup. If necessary, manually create the following rcfile.
OS |
Default Shell |
rcfile Location |
Windows |
cmd |
- |
macOS |
zsh |
~/.zsh_jdkauto/.zshrc |
Linux or WSL |
bash |
~/.bashrc_jdkauto |
Command Palette >Preferences: Open User Settings (JSON)
// Terminal Default Environment Variables
"terminal.integrated.env.windows": {
"JAVA_HOME": "c:\\Program Files\\java\\jdk-17.0.6",
"PATH": "c:\\Program Files\\java\\jdk-17.0.6\\bin;${env:PATH}"
},
// Terminal Default Profile
"terminal.integrated.defaultProfile.windows": "Command Prompt",
// Terminal Profiles Dropdown
"terminal.integrated.profiles.windows": {
"JavaSE-1.8": {
"path": "cmd",
"env": {
"JAVA_HOME": "c:\\Users\\<UserName>\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\8",
"PATH": "c:\\Users\\<UserName>\\AppData\\Roaming\\Code\\User\\globalStorage\\pleiades.java-extension-pack-jdk\\8\\bin;${env:PATH}"
},
"overrideName": true
},
"JavaSE-11": {
"path": "cmd",
"env": {
"JAVA_HOME": "c:\\Program Files\\Amazon Corretto\\jdk11.0.18_10",
"PATH": "c:\\Program Files\\Amazon Corretto\\jdk11.0.18_10\\bin;${env:PATH}"
},
"overrideName": true
},
"JavaSE-17": {
:
}
Auto-default Settings
Entries that do not have the following configuration in the user settings are automatically set to the default values of JDK Auto. Note that a debug run is required to enable Hot Code Replace (Hot Deploy).
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"editor.rulers": [ // RGBA for transparency
{
"column": 80,
"color": "#00FF0010"
},
{
"column": 100,
"color": "#BDB76B15"
},
{
"column": 120,
"color": "#FA807219"
},
],
"workbench.colorCustomizations": {
"[Default Dark+][Visual Studio Dark]": {
"tab.activeBorder": "#0F0" // Bottom border
},
"[Default Dark Modern]": {
"tab.activeBorderTop": "#00FF00",
"tab.unfocusedActiveBorderTop" : "#00FF0088",
"textCodeBlock.background": "#00000055", // Markdown preview code block
},
"editor.wordHighlightStrongBorder": "#FF6347", // Write-access
"editor.wordHighlightBorder": "#FFD700", // Read-access
"editor.selectionHighlightBorder": "#A9A9A9" // Double click selection
},

Language Pack Auto-installation
The language pack corresponding to the OS locale is installed at the first startup.
cs
, de
, es
, fr
, it
, ja
, ko
, pl
, ru
, tr
, zh-hans
or zh-hant
License
Included Extension Features
Extension Pack for Java
Since many projects are nowadays using different Java versions in development, it is recommended to specify the Java version for each project instead of the JAVA_HOME
environment variable so as not to affect the OS and OS user environment. To see which JDKs are used for your projects in multi-root workspaces, you can trigger the command Java: Configure Java Runtime in Command Palette. The Configure Runtime for Projects view is a feature of the Extension Pack for Java (Microsoft).

Change JDK for Gradle and Maven projects
If you want to change the JDK version for your Gradle or Maven projects, you need to update it in your build scripts (build.gradle
or pom.xml
). You can click ⓘ to see how to make such changes. Click 🖊 will navigate to the build script file of the project. Maven/Gradle version is recommended to be set per project in gradle-wrapper.properties
/maven-wrapper.properties
using wrapper gradlew
/mvnw
. For Spring Boot Gradle/Maven projects and general Gradle projects, these wrappers are included by default.
Change JDK for unmanaged folders
To change the JDK for unmanaged folders (with out any build tools), you can click the 🖊 button. It will list all the JDKs and you can select one for your unmanaged folders. This changes the "default": true
for java.configuration.runtimes
. Currently, it is not possible to use different Java versions in multiple unmanaged folders within the same workspace.
Spring Boot Extension Pack
Set the JDK version when creating a Spring Boot project or in build.gradle
/pom.xml
. Java projects in general can view and change the Java version from {} Java
in the bottom Status Bar.

The JDK used to run the server for Servlet and Jakarta EE applications can be specified from the context menu ≫ Edit Server ≫ vm.install.path
. The actual configuration files is in .rsp/redhat-community-server-connector/servers
in the user home.

Included Extensions
The Extension Pack for Java
is required. Other extensions can be disabled per workspace or uninstalled according to your preference. If you want to set up extensions and configurations by development language, consider Profile. (*) indicates that it will be installed if available in that environment at first startup.
Extension Pack for Java (Microsoft: MIT) / VSCode Document
Java IntelliSense, debugging, testing, Maven/Gradle support, project management and more.
Spring Boot Extension Pack (VMWare: EPL) / VSCode Document
A collection of extensions for developing Spring Boot applications.
Gradle for Java (Microsoft: MIT) / VSCode Document
Manage Gradle Projects, run Gradle tasks and provide better Gradle file authoring experience in VS Code.
Community Server Connectors (Red Hat: EPL) / VSCode Document
This extension can start, stop, publish, and control servers such as Apache Felix, Karaf, and Tomcat..
Coverage Gutters (ryanluker: MIT)
Display test coverage generated by lcov or xml - works with many languages.
Live Server (Ritwick Dey: MIT)
Launch a development local Server with live reload feature for static & dynamic pages.
Prettier - Code formatter (Prettier: MIT)
Code formatter using prettier.
Code Spell Checker (Street Side Software: GPL)
Spelling checker for source code.
Trailing Spaces (Shardul Mahadik: MIT)
Highlight trailing spaces and delete them in a flash!
Todo Tree (Gruntfuggly: MIT)
Show TODO, FIXME, etc. comment tags in a tree view.
Indent-Rainbow (oderwat: MIT)
Makes indentation easier to read.
Rainbow CSV (mechatroner: MIT)
Highlight CSV and TSV files, Run SQL-like queries.
(*) GlassIt-VSC (hikarin522: MIT)
VS Code Extension to set window to transparent on Windows and Linux platforms.
(*) Comment Translate (intellsmi: MIT)
This plugin uses the Google Translate API to translate comments for the VSCode programming language.
(*) Language Pack (Microsoft: MIT) / VSCode Document
A language pack that matches the OS Locale.
Recommended Extensions
The following are not included but are very useful extensions. Try to install it if necessary.
Error Lens (Alexander: Unknown)
Improve highlighting of errors, warnings and other language diagnostics.
SonarLint (SonarSource: GPL) / VSCode Document
Detect and fix quality issues as you write code in C, C++, Java, JavaScript, PHP, Python, HTML and TypeScript.
thymeleaf (Juha Hinkula: Unknown)
Thymeleaf snippets.
Java Server Pages (JSP) (Patrik Thorsson: MIT)
(unmaintained) JSP language support for Visual Studio Code, ported from TextMate's JSP bundle.
GistPad (Jonathan Carter: MIT)
Manage your code snippets and developer notes using GitHub Gists and repositories.
GitHub Copilot (GitHub: Subscription) / VSCode Document
Your AI pair programmer.
ChatGPT - Genie AI (Genie AI: Subscription)
Your best AI pair programmer. Save conversations and continue any time. A Visual Studio Code - ChatGPT Integration. Supports GPT-4, GPT3.5, GPT3 and Codex models. Create new files, view diffs with one click; your copilot to learn code, add tests, find bugs and more.