我的目标 我想在Linux Arm设备上运行javafx,但失败!Javafx无法在Debian8 Arm设备上运行NanoPC T3
NanoPC T3,还有一些信息:
[email protected]:~$ uname -a
Linux NanoPi3 3.4.39-s5p6818 #3 SMP PREEMPT Mon Jun 19 18:28:53 HKT 2017 armv7l GNU/Linux
[email protected]:~$ cat /etc/issue
Debian GNU/Linux 8 \n \l
[email protected]:~$ getconf LONG_BIT
32
Display: 7 in Capacitive screen (X710)
我做:
1,下载JDK-8u144-Linux的ARM32,VFP,hflt.tar.gz;
2,下载JavaFX Embedded SDK;
3,复制文件艾科rding javafxports;
4,写一个示例程序和包,运行在我的NanoPC T3上;
package application; import javafx.application.Application; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.layout.StackPane; import javafx.stage.Stage; public class Main extends Application { @Override public void start(Stage primaryStage) { try { StackPane root = new StackPane(); Button btn = new Button(); btn.setText("Say 'Hello World'"); btn.setOnAction(new EventHandler() { @Override public void handle(ActionEvent event) { System.out.println("Hello World!"); } }); root.getChildren().add(btn); Scene scene = new Scene(root,400,400); scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm()); primaryStage.setScene(scene); primaryStage.setTitle("Hello ARM"); primaryStage.show(); } catch(Exception e) { e.printStackTrace(); } } public static void main(String[] args) { launch(args); } }
我的问题
当我运行通过cammond应用程序:Java的罐子HelloArm.jar,系统UI是不是RESPONSABLE。
但是,我通常使用ssh登录设备,也可以看到线程java程序。
ps -aux | grep java。
我杀了它,系统用户界面再次合适。
我测试加入一些标志为Java: -Dmonocle.platform =单片眼镜-Djavafx.debug =真-Dprism.order = SW (tips from here)
一些想法
1,I测试Java swing,没关系;
2,我发现Javafx在linux上使用单片眼镜。我不知道,X11是javafx的不礼物?或者,我必须为X11安装一些东西?
有人能帮助我吗?
谢谢!
我已经在UDOO Quad(ARMv7)上成功运行JavaFX 8。这并不容易,最重要的是JavaFX将使用frambebuffer/dev/fb0。 –
谢谢! M. le Rutte昨天。我发现必须使用fb选项。 – larntin