From f1c07ac076739f5f693313c0da86ae26c619c07b Mon Sep 17 00:00:00 2001 From: drewbrokke Date: Thu, 15 Aug 2024 17:44:37 -0500 Subject: [PATCH] LPD-34183 com.liferay.ide.server.core: adds opens to the JDK_JAVA_OPTIONS environment variable --- .../core/portal/PortalServerBehavior.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tools/plugins/com.liferay.ide.server.core/src/com/liferay/ide/server/core/portal/PortalServerBehavior.java b/tools/plugins/com.liferay.ide.server.core/src/com/liferay/ide/server/core/portal/PortalServerBehavior.java index 5d31556560..062da7f150 100644 --- a/tools/plugins/com.liferay.ide.server.core/src/com/liferay/ide/server/core/portal/PortalServerBehavior.java +++ b/tools/plugins/com.liferay.ide.server.core/src/com/liferay/ide/server/core/portal/PortalServerBehavior.java @@ -509,6 +509,26 @@ public void setupLaunchConfiguration(ILaunchConfigurationWorkingCopy launch, IPr } } + List opens = new ArrayList<>(); + + opens.add("--add-opens=java.base/java.io=ALL-UNNAMED"); + opens.add("--add-opens=java.base/java.lang.invoke=ALL-UNNAMED"); + opens.add("--add-opens=java.base/java.lang.ref=ALL-UNNAMED"); + opens.add("--add-opens=java.base/java.lang.reflect=ALL-UNNAMED"); + opens.add("--add-opens=java.base/java.lang=ALL-UNNAMED"); + opens.add("--add-opens=java.base/java.net=ALL-UNNAMED"); + opens.add("--add-opens=java.base/java.nio.charset=ALL-UNNAMED"); + opens.add("--add-opens=java.base/java.nio=ALL-UNNAMED"); + opens.add("--add-opens=java.base/java.text=ALL-UNNAMED"); + opens.add("--add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED"); + opens.add("--add-opens=java.base/java.util.concurrent=ALL-UNNAMED"); + opens.add("--add-opens=java.base/java.util=ALL-UNNAMED"); + opens.add("--add-opens=java.base/sun.nio.ch=ALL-UNNAMED"); + opens.add("--add-opens=java.base/sun.nio.cs=ALL-UNNAMED"); + opens.add("--add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED"); + + launchEnvrionment.put("JDK_JAVA_OPTIONS", String.join(" ", opens)); + launch.setAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, launchEnvrionment); launch.setAttribute(ILaunchManager.ATTR_APPEND_ENVIRONMENT_VARIABLES, Boolean.FALSE);