我正在尝试将ScenicView作为一个独立的Java应用程序运行。我正在运行
java -jar ScenicView.jar
但我得到以下输出
java.lang.UnsatisfiedLinkError: no attach in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at org.scenicview.model.attach.AttachHandlerFactory.patchAttachLibrary(AttachHandlerFactory.java:202)
at org.scenicview.model.attach.AttachHandlerFactory.initAttachAPI(AttachHandlerFactory.java:138)
at org.scenicview.ScenicView.start(ScenicView.java:167)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$161(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.lambda$null$48(GtkApplication.java:139)
at java.lang.Thread.run(Unknown Source)
Platform running
Launching ScenicView v8.7.0
Startup done
Creating server
Server done
Number of running Java applications found: 4
Exception in thread "org.scenicview.model.update.RemoteVMsUpdateStrategy" java.lang.UnsatisfiedLinkError: no attach in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at sun.tools.attach.LinuxVirtualMachine.<clinit>(LinuxVirtualMachine.java:342)
at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:78)
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:250)
at org.fxconnector.remote.RemoteConnectorImpl.getRunningJavaFXApplications(RemoteConnectorImpl.java:368)
at org.fxconnector.remote.RemoteConnectorImpl.connect(RemoteConnectorImpl.java:251)
at org.scenicview.model.update.RemoteVMsUpdateStrategy.getActiveApps(RemoteVMsUpdateStrategy.java:57)
at org.scenicview.model.update.RemoteVMsUpdateStrategy.work(RemoteVMsUpdateStrategy.java:77)
at org.fxconnector.helper.WorkerThread.run(WorkerThread.java:43)
ScenicView打开但从未发现我的JavaFX程序正在运行。
答案 0 :(得分:0)
使用JRE版本的java会导致错误。切换到JDK版本,它按预期工作。