Skip to content

Pass Java installation and info from Java LS per project - #1700

Merged
BoykoAlex merged 2 commits into
mainfrom
java-exec
Oct 29, 2025
Merged

BoykoAlex merged 2 commits into
mainfrom
java-exec

Conversation

@BoykoAlex

@BoykoAlex BoykoAlex commented Oct 28, 2025 •

Copy link
Copy Markdown
Contributor

Java version is passed from Java LS to Boot LS. Thought it might be a good opportunity to pass just VM object rather than a lonely java version string and include that project's java home/installation folder along with it in the VM object.
There is a utility added to JavaUtils findJavaExecutable(File vmInstallationLocation) that is taken from StandardVMType in JDT launching.

There is a JavaUtils.javaHomeFromLibJar(Path libJar) which we could use to find java home for a project from the jre lib jar... that would be a less disturbing change.

Felt like passing the java home (or a java executable) from the java ls might be more robust... At the same time the JRE/JDK file system layout hasn't changed for as far as i can remember...

@martinlippert

Copy link
Copy Markdown
Member

Makes a lot of sense to me, looks great. The only thing that comes to my mind is whether to call it VM or something like JRE, since it is not really referring to a virtual machine, but more a JRE or JDK install. But other than that, let's go ahead with this.

@BoykoAlex
BoykoAlex marked this pull request as ready for review October 29, 2025 19:29
@BoykoAlex
BoykoAlex merged commit b0d1d77 into main Oct 29, 2025
@BoykoAlex
BoykoAlex deleted the java-exec branch November 7, 2025 05:34
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.

2 participants