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

Automatically register VMInstalls for the JDKs installed on the local machine #3301

Merged
merged 5 commits into from
Sep 18, 2023

Conversation

testforstephen
Copy link
Collaborator

Here are the previous implementation:

  • Use jdk-utils lib to detect the JDKs installed on the local machine and add them to the "java.configuration.runtimes" setting. The JVMs configured in settings.json have higher priority. The server will automatically register them as VMInstalls.
  • If there are multiple JDKs with the same version on the local machine, use the following order to select one as the active JVM:
    "[JDK_HOME, JAVA_HOME, PATH] > [SDKMAN, jEnv, jabba, asdf] > Common places > Others (~/.gradle/jdks)"

Here are new improvements to avoid wrong JDK issues in future:

  • Bump to jdk-utils@0.5.1 to fix wrong jdk detection issue on macOS
  • Validate if the detected jdk is a real java home (check rt.jar, jrt-fs.jar)
  • Add a setting 'java.configuration.detectJdksAtStart' to control whether to detect jdks on start

@testforstephen testforstephen added this to the End September 2023 milestone Sep 18, 2023
@testforstephen testforstephen merged commit 17edf20 into redhat-developer:master Sep 18, 2023
2 checks passed
@testforstephen testforstephen deleted the jinbo_jre branch September 18, 2023 07:10
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

Successfully merging this pull request may close these issues.

3 participants