Closed beyondxx3 closed 1 month ago
非常抱歉,目前发现在Mac上的M系列处理器的兼容性还有待改进。即使在1.8版本中能够运行,但涉及到反编译时可能会遇到问题。这种情况下建议您在虚拟机中使用。【已经计划在下一个版本中改进对M系列处理器的兼容性】
并且jdk11+内置有javafx,不需要--module-path和--add-modules
该问题与此问题相同:https://github.com/HotBoy-java/PotatoTool/issues/1
a1@HBMacBook-Pro Documents % java --module-path /Users/a1/Documents/javafx-sdk-21.0.3/lib --add-modules javafx.controls -jar PotatoTool-1.1-jdk11+.jar
Exception in Application start method Exception in thread "main" java.lang.RuntimeException: Exception in Application start method at javafx.graphics@21.0.3/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:893) at javafx.graphics@21.0.3/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.lang.IllegalAccessError: class com.sun.javafx.fxml.FXMLLoaderHelper (in unnamed module @0x53922c15) cannot access class com.sun.javafx.util.Utils (in module javafx.graphics) because module javafx.graphics does not export com.sun.javafx.util to unnamed module @0x53922c15 at com.sun.javafx.fxml.FXMLLoaderHelper.(SourceFile:38)
at javafx.fxml.FXMLLoader.(SourceFile:2142)
at com.potato.potatotool.a.start(SourceFile:52)
at javafx.graphics@21.0.3/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:839)
at javafx.graphics@21.0.3/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:483)
at javafx.graphics@21.0.3/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at javafx.graphics@21.0.3/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
at javafx.graphics@21.0.3/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
a1@HBMacBook-Pro Documents %