简体   繁体   English

我构建 Java 10 是错误的还是其他原因? 在 Pi4 上运行 MapTool(几乎?InteropFactoryN 有问题?)

[英]Did I build Java 10 wrong or is it something else? Running MapTool on Pi4 (nearly! something wrong with InteropFactoryN?)

I'm looking for a bit of Java help here.我在这里寻找一些 Java 帮助。

I am trying to run MapTool on a Raspberry Pi 4. No mean feat -- I've installed ubuntu server, so I could get a 64 bit operating system.我正在尝试在 Raspberry Pi 4 上运行 MapTool。绝非易事——我已经安装了 ubuntu 服务器,所以我可以获得 64 位操作系统。 Then I had to build OpenJDK-9 so I could build OpenJDK-10 (a weekend I won't be getting back -- Maptool requires JDK10).然后我必须构建 OpenJDK-9,这样我才能构建 OpenJDK-10(我不会回来的周末——Maptool 需要 JDK10)。 Then I was ready to follow the instructions posted here: https://www.reddit.com/r/MapTool/comments/evua2p/maptool_on_the_raspberry_pi/然后我准备按照此处发布的说明进行操作: https://www.reddit.com/r/MapTool/comments/evua2p/maptool_on_the_raspberry_pi/

Those steps said:这些步骤说:

1- download the JavaFX 11 Linux SDK (not armv6hf SDK) from here: https://gluonhq.com/products/javafx/ 1- download the JavaFX 11 Linux SDK (not armv6hf SDK) from here: https://gluonhq.com/products/javafx/

  1. extract the zip and put the lib folder into the same folder where the MapTool jar is (here ~/MapTool/lib )提取 zip 并将 lib 文件夹放入 MapTool jar 所在的同一文件夹中(此处为 ~/MapTool/lib )

  2. to run MapTool, open a terminal there (~/MapTool/) and execute in a single line java -cp "MapTool-1.7.0.jar:lib/*" net.rptools.maptool.client.LaunchInstructions要运行 MapTool,请在此处打开一个终端 (~/MapTool/) 并在一行中执行 java -cp "MapTool-1.7.0.jar:lib/*" net.rptools.maptool.client.LaunchInstructions

That almost worked .几乎奏效了 I get this error:我收到此错误:

21:54:03.013 (MapTool.java:1555) [main] INFO net.rptools.maptool.client.MapTool - AppHome System Property: /home/ubuntu/.maptool/logs
21:54:03.016 (MapTool.java:1556) [main] INFO net.rptools.maptool.client.MapTool - Logging to: /home/ubuntu/.maptool/logs/maptool.log
21:54:03.020 (MapTool.java:1563) [main] INFO net.rptools.maptool.client.MapTool - getting MapTool version from manifest: 1.7.0
21:54:03.026 (MapTool.java:1568) [main] INFO net.rptools.maptool.client.MapTool - getting MapTool vendor from manifest: rptools
21:54:03.403 (MapTool.java:1638) [main] INFO net.rptools.maptool.client.MapTool - MapTool version: 1.7.0
21:54:03.405 (MapTool.java:1641) [main] INFO net.rptools.maptool.client.MapTool - MapTool vendor: rptools
InteropFactory: cannot load com.sun.javafx.embed.swing.newimpl.InteropFactoryN
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 com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:222)
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at javafx.embed.swing.JFXPanel.initFx(JFXPanel.java:251)
at javafx.embed.swing.JFXPanel.<init>(JFXPanel.java:267)
at net.rptools.maptool.client.swing.SplashScreen.<init>(SplashScreen.java:36)
at net.rptools.maptool.client.MapTool.main(MapTool.java:1693)
at net.rptools.maptool.client.LaunchInstructions.main(LaunchInstructions.java:50)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:844)

I'm guessing I either need to add some argument to the launch command or I didn't build the image for JDK10 completely.我猜我要么需要在启动命令中添加一些参数,要么我没有完全为 JDK10 构建映像。 Can anyone help?任何人都可以帮忙吗?

So, in the end, as of this date (18 Jul 2020) it doesn't make sense to use Ubuntu server for the Pi 4 -- too much work for not enough speed payoff.因此,最后,截至目前(2020 年 7 月 18 日),为 Pi 4 使用 Ubuntu 服务器没有任何意义——工作量太大而速度回报不足。 A guy on reddit got it working using the 32 bit Raspian release. reddit 上的一个人使用 32 位 Raspian 版本让它工作。 I'm reposting his guidelines below.我在下面重新发布他的指导方针。 They work.他们工作。 https://www.reddit.com/r/MapTool/comments/evua2p/maptool_on_the_raspberry_pi/ https://www.reddit.com/r/MapTool/comments/evua2p/maptool_on_the_raspberry_pi/

download the MapTool 1.7.jar version and save it in a new folder (eg ~/MapTool/MapTool-1.7.0.jar)下载 MapTool 1.7.jar 版本并将其保存在新文件夹中(例如~/MapTool/MapTool-1.7.0.jar)

remove any currently installed OpenJDK versions sudo apt purge openjdk*删除任何当前安装的 OpenJDK 版本 sudo apt purge openjdk*

install OpenJDK version 10 (MapTool still uses SDK version 10 at least for compilation) sudo apt install openjdk-10-jdk安装 OpenJDK 版本 10(MapTool 至少仍使用 SDK 版本 10 进行编译) sudo apt install openjdk-10-jdk

download the JavaFX 11 Linux SDK (not armv6hf SDK) from here: https://gluonhq.com/products/javafx/ download the JavaFX 11 Linux SDK (not armv6hf SDK) from here: https://gluonhq.com/products/javafx/

extract the zip and put the lib folder into the same folder where the MapTool jar is (here ~/MapTool/lib)提取 zip 并将 lib 文件夹放入 MapTool jar 所在的同一文件夹中(此处为 ~/MapTool/lib)

to run MapTool, open a terminal there (~/MapTool/) and execute in a single line java -cp "MapTool-1.7.0.jar:lib/*" net.rptools.maptool.client.LaunchInstructions (put spaces where there are linebreaks in this text)要运行 MapTool,请在此处打开一个终端(~/MapTool/)并在一行中执行 java -cp "MapTool-1.7.0.jar:lib/*" net.rptools.maptool.client.LaunchInstructions(在此处放置空格)是本文中的换行符)

to make launching more convenient, put the command in an executable bash file为了使启动更方便,请将命令放入可执行的 bash 文件中

Do you really need to build the JDK yourself?你真的需要自己构建JDK吗? BellSoft, AdoptOpenJDK, Azul all provide different JDK's you can install on ARM. BellSoft、AdoptOpenJDK、Azul 都提供不同的 JDK,您可以在 ARM 上安装。 For some more info and install scripts for BellSoft LibericaJDK, check https://webtechie.be/post/2020-04-08-installing-java-and-javafx-on-raspberry-pi/有关 BellSoft LibericaJDK 的更多信息和安装脚本,请查看https://webtechie.be/post/2020-04-08-installing-java-and-javafx-on-raspberry-pi/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM