Skip to content

Browse For Existing JDKs #1260

Open
Open

Description

@opticyclic

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

Activity

  1. cypher256 commented on Nov 10, 2023

    @cypher256

    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

  2. nickzhums commented on Nov 10, 2023

    @nickzhums
    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

  3. cypher256 commented on Nov 11, 2023

    @cypher256

    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.

  4. nickzhums commented on Nov 13, 2023

    @nickzhums
    Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions