Community
Participate
Working Groups
As part of bug #575210, a PDE launch configuration automatically adds -Djava.security.manager=allow to the command line as soon as the target JRE is Java 17. However, this breaks launching Eclipse applications that are based on an older version of Eclipse (such as 2021-03) because they try to load the class "allow" for the security manager but that obviously doesn't exist (org.eclipse.osgi.internal.framework.SystemBundleActivator.installSecurityManager(EquinoxConfiguration)): org.osgi.framework.BundleException: Exception in org.eclipse.osgi.internal.framework.SystemBundleActivator.start() of bundle org.eclipse.osgi. at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:835) at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:763) at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1012) at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.initWorker(EquinoxBundle.java:198) at org.eclipse.osgi.container.SystemModule.init(SystemModule.java:99) at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle.init(EquinoxBundle.java:281) at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle.init(EquinoxBundle.java:265) at org.eclipse.osgi.launch.Equinox.init(Equinox.java:204) at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:316) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:251) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) at org.eclipse.equinox.launcher.Main.run(Main.java:1461) at org.eclipse.equinox.launcher.Main.main(Main.java:1434) Caused by: org.osgi.framework.BundleException: Failed to create security manager at org.eclipse.osgi.internal.framework.SystemBundleActivator.installSecurityManager(SystemBundleActivator.java:157) at org.eclipse.osgi.internal.framework.SystemBundleActivator.start(SystemBundleActivator.java:71) at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:814) at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:1) at java.base/java.security.AccessController.doPrivileged(AccessController.java:569) at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:806) ... 17 more Caused by: java.lang.ClassNotFoundException: allow at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:375) at org.eclipse.osgi.internal.framework.SystemBundleActivator.installSecurityManager(SystemBundleActivator.java:154) ... 22 more This is a regression because you are not able to use 2022-03 as your IDE while your target platform still uses an older version of the Eclipse framwork. This used to work until 2021-12. Possible solutions: - In addition to the Java version also take the Eclipse framework version in the target platfrom into account before setting the security manager - Make it possible for the user to disable automatic adding of the security manager system property.
Working on to add the additional check.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.