我无法在netbeans8-2上运行简单的javaFx项目
我正在使用ubuntu 18.04 LTS和openjdk 但是openjfx无法在我的系统上安装(实际上,它将安装,但位于[https://packages.ubuntu.com/bionic/amd64/openjfx/filelist]的文件将不在其位置)
例如,文件jfxrt.jar在/ usr / lib / jvm / java-8-openjdk-amd64 / jre / lib / ext /目录中不存在
所以我用sudo cp命令复制了这个文件
但是在我的系统和Internet上找不到两个文件,它们的名称分别为javafxpackager.1.gz和javapackager.1.gz
以此类推,这是我运行程序时出现的错误
run:
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.RuntimeException: java.lang.UnsatisfiedLinkError: com.sun.glass.ui.gtk.GtkApplication._isDisplayValid()Z
at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:267)
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
Caused by: java.lang.UnsatisfiedLinkError: com.sun.glass.ui.gtk.GtkApplication._isDisplayValid()Z
at com.sun.glass.ui.gtk.GtkApplication._isDisplayValid(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.isDisplayValid(GtkApplication.java:83)
at com.sun.glass.ui.gtk.GtkApplication.<init>(GtkApplication.java:67)
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)
... 9 more
/home/*/.cache/netbeans/8.2/executor-snippets/run.xml:53: Java returned: 1
建立失败(总时间:3秒)
该链接指向
<java classpath="${classpath}" classname="${classname}" dir="${work.dir}" jvm="${platform.java}" fork="true" failonerror="${java.failonerror}">
我的问题与openjfx有关吗?