Skip to content

feat: allow java.jdt.ls.java.home to use execution environment names#4445

Open
amritamishra01 wants to merge 1 commit into
redhat-developer:mainfrom
amritamishra01:feat/jdt-ls-java-home-runtime-name-4422
Open

feat: allow java.jdt.ls.java.home to use execution environment names#4445
amritamishra01 wants to merge 1 commit into
redhat-developer:mainfrom
amritamishra01:feat/jdt-ls-java-home-runtime-name-4422

Conversation

@amritamishra01

Copy link
Copy Markdown
Contributor

Summary

This change allows java.jdt.ls.java.home to accept the name of a configured Java execution environment from java.configuration.runtimes, in addition to accepting an absolute JDK path.

Motivation

Currently, java.jdt.ls.java.home expects a filesystem path. If users specify the execution environment name (for example, "JavaSE-21"), the value is treated as a path and validation fails.

This change resolves the configured runtime name to its corresponding JDK path before the existing validation logic runs.

Changes

  • Added runtime-name resolution in checkJavaPreferences().
  • Preserved existing behavior for absolute JDK paths.
  • Left the validation logic in requirements.ts unchanged.

Testing

  • Verified that an absolute JDK path continues to work as before.
  • Verified that a configured runtime name (for example, "JavaSE-21") is resolved successfully and the Java language server starts normally.

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.

1 participant