JAVA_HOME is not pointing to a JDK.
[provide a description of the issue]
Environment
-
Operating System: macOS Mojave
-
JDK version: OpenJDK 11.4
-
Visual Studio Code version: 1.38.1
-
Java extension version: 0.48.0
Steps To Reproduce
- Opening Java Project
Current Result
After opening a Java project, the configure window pops up and shows, that the JAVA_HOME is set, but it's not pointing to a JDK.

The JAVA_HOME path is correctly set.
Expected Result
JDK should be found.
@gablex I've never seen messages like "[running] cd ... ", and this extension doesn't call javac directly to compile your project. I guess you are talking about other extensions.
Just FYI, I use Language suport for Java for editing, and Debugger for Java to run/debug.
@Eskibear I agree. I have uninstalled all java plugins and installed java plugin pack only and now works
sh-5.0$ /home/admin/Downloads/Programs/jdk11/bin/java -Dfile.encoding=UTF-8 @/tmp/cp_8wzwvixrylq96snesdedrppha.argfile org.acme.martin.QuickStart
Hello, World.
Thank all.
i have the same problem on windows10 19042.423, i hava try adopt jdk 11 and oracle jdk 11, all the same problem.
As quick solution, just edit your vscode setting.json and pointing directly to java_home (eg: add
"java.home": "C:\\java\\jdk\\java-11-openjdk-11.0.8-2", ). Please refer attached picture, saved it and vscode will ask to restart. After restart, should be no more same issue. I hope this will help.
Got the same error on Linux Debian 10.5 (buster). I realized that if I was launching VSC by the application itself, it was doing this error, while if I launch VSC through the terminal, all's good. Maybe user's settings.
try cd your path in the terminal, if it fails, maybe the character format is wrong. then you could write the full path by keyboard, not Copy and Paste.
@gablex Try to install java-11-openjdk-devel. Thats work for me.
See https://github.com/redhat-developer/vscode-java/wiki/JDK-Requirements#setting-the-jdk
We have already embedd JRE per platform since v1.2.0. No need to configure java home for language server now. Shall we close this one?
See https://github.com/redhat-developer/vscode-java/wiki/JDK-Requirements#setting-the-jdk
We have already embedd JRE per platform since v1.2.0. No need to configure java home for language server now. Shall we close this one?
Yes, this should be closed
Closing it since Java extension already embedded a JRE and no need to configure Java home for language server.
For me at least, java is not embeded and if I don't configure it or even if I configure it correctly, it fails and show the popup, can't to anything to remove the popup. The easy configuration window refuses to open.