我正在尝试使我在 Windows 上制作的 JavaFX 应用程序适用于 Ubuntu。我制作了 .jar 文件,它在 Windows 10 上运行良好,但在 Ubuntu 上无法运行。无论我是从桌面双击它(启用作为可执行文件运行)还是从终端运行它,我都会收到以下错误:
javac myApp.jar或者javac myApp
error: Class names, 'myApp.jar', are only accepted if annotation processing is explicitly requested
javac -cp myApp.jar或者javac -cp myApp
javac: no source files
这是我在运行 java -jar myApp.jar 时遇到的错误:
Could not find or load main class Main
Caused by: java.lang.NoClassDefFoundError: javarx/application/Application
这是我的清单文件:
Manifest-Version: 1.0
Implementation-Title:
Implementation-Version:
Permissions: sandbox
JavaFX-Version: 8.0
Class-Path:
Created-By: JavaFX Packager
Implementation-Vendor:
Main-Class: Main
我已经使用该apt install default-jre命令安装了 Java。我还安装了 JavaFX。
我认为应用程序尝试从何处获取其 JavaFX 库可能存在一些问题,但我不确定这是否是它或我将如何修复它。
POPMUISE
12345678_0001
相关分类