1

I'm looking for a bit of Java help here.

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. Then I had to build OpenJDK-9 so I could build OpenJDK-10 (a weekend I won't be getting back -- Maptool requires JDK10). Then I was ready to follow the instructions posted here: 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. extract the zip and put the lib folder into the same folder where the MapTool jar is (here ~/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

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. Can anyone help?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
  • 1
    might something like this help you? https://stackoverflow.com/questions/55561986/how-to-solve-the-graphics-device-initialization-failed-for-d3d-sw-problem – ewokx Jul 15 '20 at 01:54

2 Answers2

1

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. A guy on reddit got it working using the 32 bit Raspian release. I'm reposting his guidelines below . They work. 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 (e.g. ~/MapTool/MapTool-1.7.0.jar)

remove any currently installed OpenJDK versions sudo apt purge openjdk*

install OpenJDK version 10 (MapTool still uses SDK version 10 at least for compilation) sudo apt install openjdk-10-jdk

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)

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)

to make launching more convenient, put the command in an executable bash file

0

Do you really need to build the JDK yourself? BellSoft, AdoptOpenJDK, Azul all provide different JDK's you can install on 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/

Frank
  • 5,741
  • 4
  • 28
  • 49
  • 1
    Believe me, I would have if I could have -- the problem was that MapTool required Java 10, which has been archived; also it had to be 64 bit (which is fairly new for the Pi). I'll look at the site you posted though. – TheDougMiester Jul 16 '20 at 03:06
  • 1
    I went to the site you posted and eventually found my way to a version of JDK which might work. I'll update this post tomorrow to let you know. Thanks for your post! – TheDougMiester Jul 16 '20 at 03:19
  • 1
    Well, Frank, I tried that and got the same output (so at least I know I built JDK correctly). Could it be something with the classpath or something? – TheDougMiester Jul 16 '20 at 23:04
  • auch, Java 10 is the "forgotten" version ;-) first time I see a hard requirement for that specific version... I see Zulu from Azul doesn't provide a Java 10 anymore. Maybe you can try with their Java11 64bit version for ARMv7/v8? https://www.azul.com/downloads/zulu-community/?version=java-11-lts&os=linux&architecture=arm-64-bit&package=jdk – Frank Jul 17 '20 at 06:34