Über installDist exportiertes Programm wirft "Unsupported JavaFX configuration"

_user_q

Aktives Mitglied
JavaFX
Über Gradle° kann man ja über {Project}\Tasks\distribution\installDist in IntelliJ das JavaFX-Programm als Datei für Windows und Linux exportieren, was dann im workspace-Ordner unter {workspace}\{Project}\build\install\{Project}\bin bzw. /lib landet. In /bin ist jetzt ein Shell Script, für Linux-User. Mit ./{Project} soll man das Programm dann ausführen können. Hier ein Bild°:

In IntelliJ:
1658754493123.png

Jedoch bekomme ich folgenden Fehler von Linux:
Code:
Jul 25, 2022 8:55:46 AM com.sun.javafx.application.PlatformImpl startup
WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @4cfaf581'
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 com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:283)
        at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:254)
        at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:264)
        at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:291)
        at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:163)
        at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:659)
        at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:679)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196)
        at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
        at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:95)
        at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
        ... 1 more
Exception in thread "main" java.lang.RuntimeException: No toolkit found
        at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:276)
        at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:291)
        at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:163)
        at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:659)
        at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:679)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196)
        at java.base/java.lang.Thread.run(Thread.java:833)
Im Internet las ich davon, dass in build.gradle unter javafx{} bestimmte modules vorhanden sein müssen. Mein Teil sieht so aus:
Code:
javafx {
    modules = ["javafx.controls", "javafx.fxml", "javafx.media", "javafx.base", "javafx.graphics"]
    version = "17"
}

jlink {
    options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
    launcher {
        name = 'buildjavafxtest'
    }
}
 

Ähnliche Java Themen

Neue Themen


Oben