Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Commit

Permalink
Fix corrupted GUI
Browse files Browse the repository at this point in the history
Exception in thread AWT-EventQueue-0 java.lang.IllegalAccessError: class javax.media.jai.RasterAccessor cannot access class sun.awt.image.BytePackedRaster (in module java.desktop) because module java.desktop does not export sun.awt.image to unnamed module
  • Loading branch information
ktgw0316 committed Oct 20, 2021
1 parent b4870ec commit 57cb1cb
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions lightcrafts/build.xml
Expand Up @@ -20,6 +20,8 @@
<isset property="USE_ICC"/>
</condition>

<property name="JVMARG" value="--add-exports=java.desktop/sun.awt.image=ALL-UNNAMED"/>

<!--===== Application build ==============================================-->

<condition property="MAKE" value="make">
Expand Down Expand Up @@ -173,6 +175,7 @@
<target name="run" depends="jar-if-necessary">
<java classname="com.lightcrafts.app.Application" dir="products"
failonerror="true" fork="true" maxmemory="768m">
<jvmarg line="${JVMARG}"/>
<classpath>
<fileset dir="products">
<include name="*.jar"/>
Expand Down
2 changes: 1 addition & 1 deletion linux/build.xml
Expand Up @@ -14,7 +14,7 @@
<arg value="${common-dir}/version.txt"/>
</exec>

<property name="JVMARG" value=""/>
<property name="JVMARG" value="--add-exports=java.desktop/sun.awt.image=ALL-UNNAMED"/>

<!--===== Application build ==============================================-->

Expand Down
1 change: 1 addition & 0 deletions linux/products/lightzone
Expand Up @@ -88,6 +88,7 @@ done

echo ${classpath}
(cd ${pkgjavadir} && LD_LIBRARY_PATH=${pkglibexecdir} exec java \
--add-exports=java.desktop/sun.awt.image=ALL-UNNAMED \
-classpath ${classpath} \
-XX:MinHeapFreeRatio=30 \
-XX:MaxHeapFreeRatio=30 \
Expand Down
3 changes: 3 additions & 0 deletions macosx/build.xml
Expand Up @@ -22,6 +22,8 @@
<isset property="UNIVERSAL"/>
</condition>

<property name="JVMARG" value="--add-exports=java.desktop/sun.awt.image=ALL-UNNAMED"/>

<!--===== Application build ==============================================-->

<target name="common">
Expand Down Expand Up @@ -100,6 +102,7 @@
<java classname="com.lightcrafts.platform.macosx.MacOSXLauncher"
dir="products" failonerror="true" fork="true"
maxmemory="${maxmemory}">
<jvmarg line="${JVMARG}"/>
<classpath>
<fileset dir="products">
<include name="*.jar"/>
Expand Down
6 changes: 3 additions & 3 deletions windows/build.xml
Expand Up @@ -31,6 +31,8 @@
<property name="installer-name" value="${app-name}-Installer-${jre-arch}.exe"/>
<property name="windows-jar" value="products/lightcrafts-windows.jar"/>

<property name="JVMARG" value="--add-exports=java.desktop/sun.awt.image=ALL-UNNAMED"/>

<!-- The default maxmemory for the run* targets. -->
<property name="maxmemory" value="512m"/>

Expand Down Expand Up @@ -116,9 +118,7 @@
<java classname="com.lightcrafts.platform.windows.WindowsLauncher"
dir="products" failonerror="true" fork="true"
maxmemory="${maxmemory}">
<!--
<jvmarg value="-Xincgc"/>
-->
<jvmarg line="${JVMARG}"/>
<classpath>
<fileset dir="products">
<include name="*.jar"/>
Expand Down

0 comments on commit 57cb1cb

Please sign in to comment.