You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature Request: Set default in java.configuration.runtimes to the workspace environment variable JAVA_HOME #1293
Currently, the default of the Java extension java.configuration.runtimes is used as the default for No Build Tools, but it would be useful to set it to the environment variable JAVA_HOME which is valid for each workspace. The environment variable here is not the terminal, but process.env.JAVA_HOME, which is referenced by extensions such as
Hi Shinji Kashihara (@cypher256), I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.
Current state
The Red Hat Java extension reads java.configuration.runtimes at machine scope, so you cannot point the default to a workspace‐specific process.env.JAVA_HOME today.
Workarounds & tracking
You can set a workspace-specific java.home in .vscode/settings.json, but it must be a literal path (no built-in support for ${env:JAVA_HOME} in this setting).
The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!
Activity
github-actions commentedon Nov 4, 2025
Hi Shinji Kashihara (@cypher256), I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.
Current state
java.configuration.runtimesat machine scope, so you cannot point the default to a workspace‐specificprocess.env.JAVA_HOMEtoday.Workarounds & tracking
You can set a workspace-specific
java.homein.vscode/settings.json, but it must be a literal path (no built-in support for${env:JAVA_HOME}in this setting).Track/upvote these feature requests:
• Per-project runtime override (proposed
java.project.runtime): java.configuration.runtimes in settings.json are ignored redhat-developer/vscode-java#2001 (comment)• Select Java runtime per workspace: feature request: select java runtime in vs code settings redhat-developer/vscode-java#1684
• Setting a different JDK version in a workspace: Setting a different jdk version in settings.json (workspace) redhat-developer/vscode-java#1431
Core VS Code API request to let extensions inject env vars: API: allow an extension to change the environment variables vscode#152806
Other references with low confidence
None
The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!