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
JDK on PATH environment variable is not detected #1391
Sheng Chen (@jdneo) yes, i can get it work by setting such a variable. but it would be really nice if the vscode java pack is more intelligent here (or less) and relies on PATH only.
Hi soloturn, 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.
Suggestions
Verify java is on your PATH:
Open a new Command Prompt or PowerShell.
Run java -version. If you see an error, your PATH isn’t picking up the JDK.
After changing system or user PATH, restart VS Code (or your machine) so it picks up the updated environment.
Launch VS Code from a shell that has the correct PATH (e.g. code .) to ensure it inherits your variables.
Explicitly configure the JDK in VS Code settings rather than relying on PATH:
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
jdneo commentedon Oct 14, 2024
Have you tried set the JDK to the setting
java.configuration.runtimes? See: https://github.com/redhat-developer/vscode-java?tab=readme-ov-file#project-jdkssoloturn commentedon Oct 14, 2024
Sheng Chen (@jdneo) yes, i can get it work by setting such a variable. but it would be really nice if the vscode java pack is more intelligent here (or less) and relies on PATH only.
[-]java is on the path, extension does not recognize it[/-][+]JDK on PATH environment variable is not detected[/+]github-actions commentedon Nov 4, 2025
Hi soloturn, 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.
Suggestions
javais on your PATH:java -version. If you see an error, your PATH isn’t picking up the JDK.code .) to ensure it inherits your variables.JAVA_HOMEenvironment variable pointing to the JDK root (not thebinfolder), then restart VS Code.References with high confidence
java.homeorJAVA_HOME:https://github.com/redhat-developer/vscode-java#setting-the-jdk
Improve failed JDK detection diagnostic redhat-developer/vscode-java#835
Other references with low confidence
java.hometo a proper JDK. Java language support requires Java 8 (using C:\ProgramData\Oracle\Java\javapath\java.exe) redhat-developer/vscode-java#441JAVA_HOME. The "path" argument must be of type string. Received type object redhat-developer/vscode-java#1449The 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!