have vscode-java detect jbang installed jdks
would like to have vscode-java function if it can pick up jdk's installed by vscode-java.
so that if user have jbang installed vscode-java will also "just work".
I see issues mention detection is done by node-jdk-utils so I made https://github.com/Eskibear/node-jdk-utils/pull/18 which should add the base detection.
But I'm also seeing src/findJavaRuntimes.ts which does not seem to use node-jdk-utils.
src/findJavaRuntimes was removed in #2246 (1.2.0). Is there some other extension you're seeing that still has that ?
@rgrunber probably just github / google search leading me a stray.
so would https://github.com/Eskibear/node-jdk-utils/pull/18 make it work in vscode-java ?
It should. Those jbang JDKs would be pick up through autodetection and sent to the language server.
https://github.com/Eskibear/node-jdk-utils/pull/18 was merged...any eta on it being available in vscode-java?
it does not seem to be present :)
Needs a release at https://github.com/Eskibear/node-jdk-utils/releases , then https://www.npmjs.com/package/jdk-utils?activeTab=versions .
@maxandersen I've built v1.44.2025070813 in the pre-release stream, which contains the update to jdk-utils. Let me know if that fixes the issue.
so I've switched to pre-release, I have java 11 and 21 installed in ~/.jbang/cache/jdks/* but on restart I still get:
"Please download and install a JDK to compile your project. You can configure your projects with different JDKs by the setting 'java.configuration.runtimes'"
is there a way for me to see which jdk locations Vscode-java have considered (and rejected?) as not good enough jdks for it to use?
Any updates ?
~~You should verify that you aren't overriding java.configuration.detectJdksAtStart. It needs to be set to true in order for the JDKs to be loaded into java.configuration.runtimes. It is the default option though.~~ I see it being detected for me.
Nevermind from above. I think the issue is not about auto-sending the JDKs, but in the startup code at https://github.com/redhat-developer/vscode-java/blob/053490ef0a7da1140ed19df474164595d8892f88/src/requirements.ts#L74-L107