Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browse For Existing JDKs #1260

Open
opticyclic opened this issue Nov 10, 2023 · 4 comments
Open

Browse For Existing JDKs #1260

opticyclic opened this issue Nov 10, 2023 · 4 comments
Assignees

Comments

@opticyclic
Copy link

Suggestion

I expect to be able to browse for a JDK and not have to manually type some json.

Use Cases

What do you want to use this for?

Setting up a new runtime using a JDK that is extracted locally not with an installer

What shortcomings exist with current approaches?

I don't like json and I shouldn't have to type out directory name when this use case has been done with a GUI for the last 2 decades.

Examples

  • Download and extract a JDK
  • Go to Configure Runtime
  • Click a button that brings up a filesystem browser
  • Select the directory of the JDK
@cypher256
Copy link

cypher256 commented Nov 10, 2023

For your reference, there are Java auto-configuration extensions as below:
https://marketplace.visualstudio.com/items?itemName=Pleiades.java-extension-pack-jdk

Additional Comments
I misunderstood your intent. Arbitrary directories cannot be detected. This automatic configuration can detect JDKs that you have installed without using an installer, but only in the following locations:

Auto-scan from packages SDKMAN, Homebrew, jEnv, jabba, ASDF, Gradle, Scoop, Chocolatey, IntelliJ etc...
Auto-scan from installations Adoptium, BellSoft, Corretto, Microsoft, Oracle, Red Hat, Semeru, Zulu etc...
Auto-detect environment variables JAVA_HOME, JDK_HOME and PATH

@nickzhums
Copy link
Member

Hi @opticyclic, have you tried using this command: Java: Configure Java Runtime in Command Palette? This will bring up a GUI to configure Java Runtime

@cypher256
Copy link

@nickzhums Java: Configure Java Runtime allows you to drill down and select JAVA_HOME or the JDK installed using the installer, but as @opticyclic says, I don't think you can specify any directory.

The GUI seems to allow you to select the directory detected by node-jdk-utils. Also, I think that even the JDK that you edited the json and added to java.configuration.runtimes cannot be selected in that GUI.

@nickzhums
Copy link
Member

Makes sense. We'll think about this, thanks. Issue assigned to me and @jdneo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants