Skip to content

Commit b74f652

Browse files
authored
build: Add Java options to prevent warnings running JDK24+, remove deprecated options (#820)
1 parent 4d84deb commit b74f652

File tree

5 files changed

+13
-2
lines changed

5 files changed

+13
-2
lines changed

.github/scripts/jpackage.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ REM set MODULES=java.desktop,java.logging,java.naming,java.prefs,java.security.j
2525
--type msi ^
2626
--java-options "-Djavafx.allowjs=true" ^
2727
--java-options "--add-opens=javafx.fxml/javafx.fxml=ALL-UNNAMED" ^
28+
--java-options "--enable-native-access=javafx.graphics" ^
29+
--java-options "--sun-misc-unsafe-memory-access=allow" ^
2830
--java-options "-Djava.library.path=runtime\bin;runtime\lib" ^
2931
--icon app/assets/windows/icon-windows.ico ^
3032
--win-dir-chooser ^

.github/workflows/bundles-linux.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,10 @@ jobs:
7373
# Create DEB
7474
.github/scripts/jpackage.sh \
7575
--icon app/assets/linux/icon-linux.png \
76-
--java-options '"-Djdk.gtk.version=2"' \
7776
--java-options '"-Djavafx.allowjs=true"' \
7877
--java-options '"--add-opens=javafx.fxml/javafx.fxml=ALL-UNNAMED"' \
78+
--java-options '"--enable-native-access=javafx.graphics"' \
79+
--java-options '"--sun-misc-unsafe-memory-access=allow"' \
7980
--java-options '"-Djava.library.path=/opt/scenebuilder/lib/runtime/bin:/opt/scenebuilder/lib/runtime/lib"' \
8081
--linux-menu-group '"Development;Building;GUIDesigner;Java;"' \
8182
--resource-dir app/assets/linux \
@@ -85,8 +86,10 @@ jobs:
8586
# Create RPM
8687
.github/scripts/jpackage.sh \
8788
--icon app/assets/linux/icon-linux.png \
88-
--java-options '"-Djdk.gtk.version=2"' \
89+
--java-options '"-Djavafx.allowjs=true"' \
8990
--java-options '"--add-opens=javafx.fxml/javafx.fxml=ALL-UNNAMED"' \
91+
--java-options '"--enable-native-access=javafx.graphics"' \
92+
--java-options '"--sun-misc-unsafe-memory-access=allow"' \
9093
--linux-menu-group '"Development;Building;GUIDesigner;Java;"' \
9194
--resource-dir app/assets/linux \
9295
--install-dir /opt \

.github/workflows/bundles-mac.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ jobs:
8787
--icon app/assets/osx/icon-mac.icns \
8888
--java-options '"-Djavafx.allowjs=true"' \
8989
--java-options '"--add-opens=javafx.fxml/javafx.fxml=ALL-UNNAMED"' \
90+
--java-options '"--enable-native-access=javafx.graphics"' \
91+
--java-options '"--sun-misc-unsafe-memory-access=allow"' \
9092
--type dmg \
9193
--mac-package-identifier com.gluonhq.scenebuilder \
9294
--mac-package-name 'Scene Builder' \

.github/workflows/bundles-mac_aarch64.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ jobs:
8888
--icon app/assets/osx/icon-mac.icns \
8989
--java-options '"-Djavafx.allowjs=true"' \
9090
--java-options '"--add-opens=javafx.fxml/javafx.fxml=ALL-UNNAMED"' \
91+
--java-options '"--enable-native-access=javafx.graphics"' \
92+
--java-options '"--sun-misc-unsafe-memory-access=allow"' \
9193
--type dmg \
9294
--mac-package-identifier com.gluonhq.scenebuilder \
9395
--mac-package-name 'Scene Builder' \

pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@
8585
<option>--add-opens=javafx.fxml/javafx.fxml=com.gluonhq.scenebuilder.kit</option>
8686
<option>--add-opens=javafx.controls/com.sun.javafx.scene.control.skin.caspian=com.gluonhq.scenebuilder.kit</option>
8787
<option>--add-opens=javafx.controls/com.sun.javafx.scene.control.skin.modena=com.gluonhq.scenebuilder.kit</option>
88+
<option>--enable-native-access=javafx.graphics</option>
89+
<option>--sun-misc-unsafe-memory-access=allow</option>
8890
</options>
8991
</configuration>
9092
</plugin>

0 commit comments

Comments
 (0)