我想知道,如何在Arm体系结构的Arch Linux中安装openjfx?我已经安装了openjdk 10,但无法编译javafx应用程序。 这是程序。我在任何地方都找不到jfxrt.jar。
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Jfx extends Application {
@Override
public void start(Stage primaryStage) throws
Exception {
Button button = new Button("Hello World");
StackPane myPane = new StackPane();
myPane.getChildren().add(button);
Scene myScene = new Scene(myPane);
primaryStage.setScene(myScene);
primaryStage.setWidth(800);
primaryStage.setHeight(600);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
这是错误日志
Jfx.java:1: error: package javafx.application does
not exist
import javafx.application.Application;
^
Jfx.java:2: error: package javafx.scene does not
exist
import javafx.scene.Scene;
^
Jfx.java:3: error: package javafx.scene.control
does not exist
import javafx.scene.control.Button;
^
Jfx.java:4: error: package javafx.scene.layout
does not exist
import javafx.scene.layout.StackPane;
^
Jfx.java:5: error: package javafx.stage does not
exist
import javafx.stage.Stage;
^
Jfx.java:6: error: cannot find symbol
public class Jfx extends Application {
^
symbol: class Application
Jfx.java:8: error: cannot find symbol
public void start(Stage primaryStage) throws
Exception {
^
symbol: class Stage
location: class Jfx