From cf2d437067187344dcfb5d26e36eccbe0d462209 Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Sat, 14 Dec 2024 00:26:02 +0100 Subject: [PATCH] [Launching] Don't add -Djava.security.manager=allow for Java-24 or later Since Java-24 the security-manager cannot be used anymore and launching a Java-24 VM fails to launch if the VM-argument '-Djava.security.manager=allow' is specified. Part of https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/2623 --- .../eclipse/pde/launching/AbstractPDELaunchConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/org.eclipse.pde.launching/src/org/eclipse/pde/launching/AbstractPDELaunchConfiguration.java b/ui/org.eclipse.pde.launching/src/org/eclipse/pde/launching/AbstractPDELaunchConfiguration.java index 04920b916c..ff1ea265cd 100644 --- a/ui/org.eclipse.pde.launching/src/org/eclipse/pde/launching/AbstractPDELaunchConfiguration.java +++ b/ui/org.eclipse.pde.launching/src/org/eclipse/pde/launching/AbstractPDELaunchConfiguration.java @@ -176,7 +176,7 @@ private String[] updateVMArgumentWithAdditionalArguments(String[] args, IVMInsta if (isEclipseBundleGreaterThanVersion(4, 24) // Don't add allow flags for eclipse before 4.24 && vmInstall instanceof AbstractVMInstall install) { String vmver = install.getJavaVersion(); - if (vmver != null && JavaCore.compareJavaVersions(vmver, JavaCore.VERSION_17) >= 0) { + if (vmver != null && JavaCore.compareJavaVersions(vmver, JavaCore.VERSION_17) >= 0 && JavaCore.compareJavaVersions(vmver, JavaCore.VERSION_23) <= 0) { VMHelper.addNewArgument(arguments, "-Djava.security.manager", "allow"); //$NON-NLS-1$ //$NON-NLS-2$ } }