TestStaticJavaFX
1.0.0
这是一个我试图仅使用GRAALVM创建Javafx项目的静态二进制的项目
musl和zlib为了设置,请阅读Graalvm提供的文档make和configure 重要的
运行之前,请更改native.sh机中所需的路径。
mvn clean install 。这将创建一个罐子,并将所需模块的罐子放入target/modules目录中。native.sh映像以构建静态二进制文件的本机。当我尝试运行较早构建的静态可执行文件时,我会遇到以下错误?
Loading library prism_es2 from resource failed : java . lang.UnsatisfiedLinkError: Can't load library: /home/saptarshi-sarkar/.openjfx/cache/22-ea+11/amd64/libprism_es2.so
java . lang.UnsatisfiedLinkError: Can't load library: /home/saptarshi-sarkar/.openjfx/cache/22-ea+11/amd64/libprism_es2.so
at org . graalvm.nativeimage.builder/com.oracle.svm.core.jdk.NativeLibraries.loadLibraryAbsolute(NativeLibraries.java:105)
at java . [email protected]/java.lang.ClassLoader.loadLibrary(ClassLoader.java:114)
at java . [email protected]/java.lang.Runtime.load0(Runtime.java:852)
at java . [email protected]/java.lang.System.load(System.java:2030)
at javafx . graphics@22-ea/com.sun.glass.utils.NativeLibLoader.installLibraryFromResource(NativeLibLoader.java:220)
at javafx . graphics@22-ea/com.sun.glass.utils.NativeLibLoader.loadLibraryFromResource(NativeLibLoader.java:200)
at javafx . graphics@22-ea/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:142)
at javafx . graphics@22-ea/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:58)
at javafx . graphics@22-ea/com.sun.prism.es2.ES2Pipeline.lambda$static$0(ES2Pipeline.java:63)
at java . [email protected]/java.security.AccessController.executePrivileged(AccessController.java:128)
at java . [email protected]/java.security.AccessController.doPrivileged(AccessController.java:319)
at javafx . graphics@22-ea/com.sun.prism.es2.ES2Pipeline.<clinit>(ES2Pipeline.java:52)
at java . [email protected]/java.lang.Class.ensureInitialized(DynamicHub.java:599)
at java . [email protected]/java.lang.Class.forName(DynamicHub.java:1396)
at java . [email protected]/java.lang.Class.forName(DynamicHub.java:1352)
at java . [email protected]/java.lang.Class.forName(DynamicHub.java:1346)
at javafx . graphics@22-ea/com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218)
at javafx . graphics@22-ea/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:92)
at javafx . graphics@22-ea/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
at java . [email protected]/java.lang.Thread.runWith(Thread.java:1583)
at java . [email protected]/java.lang.Thread.run(Thread.java:1570)
at org . graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:853)
at org . graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:829)
Graphics Device initialization failed for : es2 , sw
Error initializing QuantumRenderer : no suitable pipeline found
java . lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at javafx . graphics@22-ea/com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:283)
at javafx . graphics@22-ea/com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:253)
at javafx . graphics@22-ea/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:263)
at javafx . graphics@22-ea/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:290)
at javafx . graphics@22-ea/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:162)
at javafx . graphics@22-ea/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:651)
at javafx . graphics@22-ea/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:671)
at javafx . graphics@22-ea/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196)
at java . [email protected]/java.lang.Thread.runWith(Thread.java:1583)
at java . [email protected]/java.lang.Thread.run(Thread.java:1570)
at org . graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:853)
at org . graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:829)
Caused by : java . lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at javafx . graphics@22-ea/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:95)
at javafx . graphics@22-ea/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
... 4 more
Exception in thread "main" java . lang.RuntimeException: No toolkit found
at javafx . graphics@22-ea/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:275)
at javafx . graphics@22-ea/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:290)
at javafx . graphics@22-ea/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:162)
at javafx . graphics@22-ea/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:651)
at javafx . graphics@22-ea/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:671)
at javafx . graphics@22-ea/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196)
at java . [email protected]/java.lang.Thread.runWith(Thread.java:1583)
at java . [email protected]/java.lang.Thread.run(Thread.java:1570)
at org . graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:853)
at org . graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:829)我现在仍在寻找上述问题的可行解决方案。我知道gluonfx maven插件,但是它不能生成静态可执行文件。
笔记
如果有人找到了解决方案,则可以打开问题/讨论或拉动请求来解决提及所需更改的错误。这对社区非常有帮助吗?