我的目標 我想在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