我正在尝试安装 mqtt-spy,但它就是打不开。我已经安装了 java8 和 java9,当我使用命令时:
java -jar mqtt-spy-0.5.4-jar-with-dependencies.jar
这是我得到的输出:
No protocol specified
No protocol specified
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.UnsupportedOperationException: Unable to open DISPLAY
at com.sun.glass.ui.gtk.GtkApplication.<init>(GtkApplication.java:68)
at com.sun.glass.ui.gtk.GtkPlatformFactory.createApplication(GtkPlatformFactory.java:41)
at com.sun.glass.ui.Application.run(Application.java:146)
at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:257)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:211)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:675)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:337)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
... 5 more
就是这样,什么都没发生。我是 Ubuntu 的新手,所以我不知道是什么原因造成的。
答案1
我也有同样的问题。当我运行这个时,用户界面从未显示出来
java -jar mqtt-spy-0.6.0-beta-b52-jar-with-dependencies.jar
2017-03-28 13:07:46,369 DEBUG [MqttViewManager ] - Selected perspective = DEFAULT
2017-03-28 13:07:47,461 INFO [MqttViewManager ] - Default configuration file present (/Users/v506616/mqtt-spy/mqtt-spy-configuration.xml) = false
2017-03-28 13:07:47,462 DEBUG [BaseConfigurationManager ] - Creating root group called 'All connections'
2017-03-28 13:07:53,280 DEBUG [ControlPanelController ] - Retrieved version info = pl.baczkowicz.spy.ui.generated.versions.SpyVersions@7df7be89[releaseStatuses=pl.baczkowicz.spy.ui.generated.versions.ReleaseStatuses@6b7b57e7[releaseStatus={pl.baczkowicz.spy.ui.generated.versions.ReleaseStatus@7c7469d5[fromVersion=0.5.1-42, toVersion=0.5.1-42, updateTitle=Bugs have been found in this release!, updateDetails=Best to update to version 0.5.4 (build 52)., updateStatus=CRITICAL],pl.baczkowicz.spy.ui.generated.versions.ReleaseStatus@7f11b17f[fromVersion=0.5.1-44, toVersion=0.5.1-44, updateTitle=Bugs have been found in this release!, updateDetails=Best to update to version 0.5.4 (build 52)., updateStatus=CRITICAL],pl.baczkowicz.spy.ui.generated.versions.ReleaseStatus@3f525be2[fromVersion=0.5.2-46, toVersion=0.5.3-50, updateTitle=Almost there!, updateDetails=Download version 0.5.4 (build 52) and get the edge again!, updateStatus=UPDATE_RECOMMENDED],pl.baczkowicz.spy.ui.generated.versions.ReleaseStatus@e27e780[fromVersion=0.5.4-52, toVersion=0.5.4-52, updateTitle=Living on the edge!, updateDetails=You're on the latest release - [version]., updateStatus=ON_LATEST],pl.baczkowicz.spy.ui.generated.versions.ReleaseStatus@51421d50[fromVersion=0.6.0-beta-26, toVersion=0.6.0-beta-51, updateTitle=Living in the stone age!, updateDetails=There is a new experimental release - 0.6.0 beta (build 52)., updateStatus=UPDATE_RECOMMENDED],pl.baczkowicz.spy.ui.generated.versions.ReleaseStatus@23aac44e[fromVersion=0.6.0-beta-52, toVersion=0.6.0-beta-99, updateTitle=Living on the edge!, updateDetails=You're on an experimental beta release - [version]., updateStatus=ON_LATEST]}], latestReleases=pl.baczkowicz.spy.ui.generated.versions.LatestReleases@e0a0692[latestRelease=<null>]]
答案2
我尝试了mqtt-spy-0.5.4-jar-with-dependencies.jar
和mqtt-spy-1.0.0.jar
。
在 Ubuntu 16.04 LTS 上安装 OpenJDK 1.8.0_131 软件包后,它们可以正常启动openjfx
。建议在维基页面。