[英]Javafx Can not run on Debian8 Arm Device NanoPC T3
My target 我的目标
I want to run javafx on Linux Arm device, but failed! 我想在Linux Arm设备上运行javafx,但是失败了!
NanoPC T3, there are some information: NanoPC T3,有一些信息:
fa@NanoPi3:~$ uname -a
Linux NanoPi3 3.4.39-s5p6818 #3 SMP PREEMPT Mon Jun 19 18:28:53 HKT 2017 armv7l GNU/Linux
fa@NanoPi3:~$ cat /etc/issue
Debian GNU/Linux 8 \n \l
fa@NanoPi3:~$ getconf LONG_BIT
32
Display: 7 in Capacitive screen (X710)
I had done: 我做了:
Write a sample app and package, run on my NanoPC T3: 编写示例应用程序和程序包,在我的NanoPC T3上运行:
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<ActionEvent>() { @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); } }
My problem 我的问题
When I run the app by cammond: java -jar HelloArm.jar, system UI is not RESPONSABLE. 当我通过cammond运行该应用程序时:java -jar HelloArm.jar,系统用户界面不负责。 But, I log in the device using ssh normally, also can see the thread java program:
但是,我正常使用ssh登录设备,也可以看到线程java程序:
ps -aux | grep java.
When I kill it, System UI get right again. 当我杀死它时,系统UI再次恢复正常。 I test adding some flag for java ( tips from here ):
我测试了为Java添加一些标记( 来自此处的提示 ):
-Dmonocle.platform=Monocle -Djavafx.debug=true -Dprism.order=sw
Some idea 一些想法
Finally, We found that we need to add -Djavafx.platform = eglfb
, let the JavaFX
rander the UI using eglfb
. 最后,我们发现我们需要添加
-Djavafx.platform = eglfb
,让JavaFX
使用eglfb
改变UI。
Good luck. 祝好运。
Thanks. 谢谢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.