Skip to content

Commit 0ae4b0a

Browse files
committed
fix #734
1 parent 9e534ea commit 0ae4b0a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • py5_resources/py5_module/py5_tools

py5_resources/py5_module/py5_tools/jvm.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,10 @@ def _start_jvm() -> None:
166166
if "--enable-native-access=ALL-UNNAMED" not in _options:
167167
_options.append("--enable-native-access=ALL-UNNAMED")
168168

169-
if "--enable-native-access=javafx.graphics" not in _options:
169+
if (
170+
any([f.name == "javafx.graphics.jar" for f in _classpath])
171+
and "--enable-native-access=javafx.graphics" not in _options
172+
):
170173
_options.append("--enable-native-access=javafx.graphics")
171174

172175
jpype.startJVM(default_jvm_path, *_options, convertStrings=False)

0 commit comments

Comments
 (0)