Can't execute OpenJFX app from command-line on macOS

Duquette, Will (US 393E) william.h.duquette at jpl.nasa.gov
Mon Sep 16 18:01:24 UTC 2019


Howdy!


I'm running on Mojave using AdoptOpenJDK 12 and OpenJFX 13.  I've built a simple hello world app (a label in a stackpane).  When I try to run it from the command line, I get this:


$ java --module-path ${PATH_TO_FX} --add-modules javafx.controls -cp dist/MyApp.jar myapp.App

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/com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)

at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:244)

at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260)

...

Any ideas?

The app looks like this:

package myapp;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

/**
 *
 * @author will
 */
public class App extends Application {
@Override
public void start(Stage stage) throws Exception {
        StackPane root = new StackPane();

        Label label = new Label("Hello, world!");

        label.setPrefWidth(200);
        label.setPrefHeight(200);

        root.getChildren().add(label);

        stage.setTitle("Hello, World");
        stage.setScene(new Scene(root));
        stage.show();
}

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        launch(args);
    }
}


More information about the openjfx-dev mailing list