From b2e8e5211c84e8a2b6b0a77e8f9b121ca06f851b Mon Sep 17 00:00:00 2001 From: Mickael Istria Date: Mon, 31 Mar 2025 21:38:53 +0200 Subject: [PATCH] Add current java.home to detected installations --- .../jdt/internal/launching/DetectVMInstallationsJob.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/DetectVMInstallationsJob.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/DetectVMInstallationsJob.java index 4ffe57bfbf..140005b6f9 100644 --- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/DetectVMInstallationsJob.java +++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/DetectVMInstallationsJob.java @@ -159,6 +159,10 @@ private Collection computeCandidateVMs(StandardVMType standardType) { .collect(Collectors.toSet()); // particular VM installations + String current = System.getProperty("java.home"); //$NON-NLS-1$ + if (current != null) { + directories.add(new File(current)); + } String javaHome = System.getenv("JAVA_HOME"); //$NON-NLS-1$ if (javaHome != null) { directories.add(new File(javaHome));