From 5be5624d48b58560b680721582729f2233e9fb7e Mon Sep 17 00:00:00 2001 From: justin-huskic Date: Fri, 28 Jul 2023 20:05:35 -0600 Subject: [PATCH] A fix for Issue 250: https://github.com/jawi/ols/issues/250 This fix allows the program to run on later versions of Java where the module loader is more restrictive. See https://stackoverflow.com/questions/74006627/module-java-base-does-not-opens-java-lang-java-17-0-4-1 for the rationale. --- ols.distribution/src/main/resources/run.bat | 1 + pom.xml | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ols.distribution/src/main/resources/run.bat b/ols.distribution/src/main/resources/run.bat index 1886a185..8dc65032 100644 --- a/ols.distribution/src/main/resources/run.bat +++ b/ols.distribution/src/main/resources/run.bat @@ -31,6 +31,7 @@ rem give the client roughly 1gigabyte of memory set MEMSETTINGS=-Xmx1024m rem set SYSPROPS=-Djna.nosys=true +set JDK_JAVA_OPTIONS=--add-opens java.desktop/javax.swing.plaf.basic=ALL-UNNAMED rem For now, use the "console enabled" java for Windows... java %PLATFORMOPTS% %MEMSETTINGS% %SYSPROPS% -cp "%CLASSPATH%" nl.lxtreme.ols.runner.Runner -pluginDir="%PLUGINDIR%" %* diff --git a/pom.xml b/pom.xml index d9a3484e..2d0b1e33 100644 --- a/pom.xml +++ b/pom.xml @@ -177,7 +177,11 @@ 2.21.0 true - once + once + + --add-opens java.base/java.lang=ALL-UNNAMED + --add-opens java.desktop/java.awt=ALL-UNNAMED +