gpt4 book ai didi

java - 仅在树莓派中没有此类方法错误

转载 作者:太空宇宙 更新时间:2023-11-04 07:14:16 25 4
gpt4 key购买 nike

厌倦了树莓派......

我使用 netbeans 7.3.1、jdk 1.7 从 Windows 7 创建了一个 javaFX 应用程序。

应用程序包含了一些外部 jar,包括 javafx-dialogs-0.0.3、jaybird 等。

它在 Windows 7、ubuntu 和 centOS 上运行良好

然后我尝试在树莓派中从命令行运行相同的应用程序jar。但它给出了类似 "noSuchMethoderror "的异常并退出应用程序..

可能是什么问题???

在编译和运行时使用相同的jar..

这是完整的堆栈

Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:367)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:305)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:894)
at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:56)
at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:158)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NoSuchMethodError: com.sun.javafx.css.StyleManager.getPseudoclassMask(Ljava/lang/String;)J
at javafx.scene.control.Dialogs$FXDialog$RootPane.<clinit>(Dialogs.java:1310)
at javafx.scene.control.Dialogs$FXDialog.<init>(Dialogs.java:1131)
at javafx.scene.control.Dialogs$FXDialog.<init>(Dialogs.java:1088)
at javafx.scene.control.Dialogs$DialogTemplate.<init>(Dialogs.java:616)
at javafx.scene.control.Dialogs.showSimpleContentDialog(Dialogs.java:494)
at javafx.scene.control.Dialogs.showInformationDialog(Dialogs.java:266)
at displayshelftry.Utilities.propertySettings(Utilities.java:325)
at displayshelftry.DisplayShelfTry.run(DisplayShelfTry.java:356)
at displayshelftry.DisplayShelfTry.start(DisplayShelfTry.java:1150)
at com.sun.javafx.application.LauncherImpl$8.run(LauncherImpl.java:837)
at com.sun.javafx.application.PlatformImpl$7.run(PlatformImpl.java:331)
at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:297)
at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:294)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$6.run(PlatformImpl.java:294)
at com.sun.glass.ui.lens.LensApplication$RunnableEvent.dispatch(LensApplication.java:182)
at com.sun.glass.ui.lens.LensApplication._runLoop(LensApplication.java:861)
at com.sun.glass.ui.lens.LensApplication.access$1700(LensApplication.java:58)
at com.sun.glass.ui.lens.LensApplication$4.run(LensApplication.java:914)
... 1 more

谢谢...

最佳答案

尝试使用 jdk8 构建您的应用程序。 jdk8 通常也应该运行 jdk7 构建的 jar,但它尚未发布,并且自 jdk8 起才支持 rasberry pi。

官方 pi 与 javafx 页面还声称并非所有演示都可以在 pi 上运行(注意它尚未发布产品):https://wiki.openjdk.java.net/display/OpenJFX/OpenJFX+on+the+Raspberry+Pi

所以你可能想尝试 BrickBreaker 而不是 DisplayShelf :)

关于java - 仅在树莓派中没有此类方法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20209532/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com