I’m running Ubuntu 20.10 and though ./gatling.sh is executing as expected, ./recorder.sh does not open the GUI.
kenric@oryx-pro:~/gatling-charts-highcharts-bundle-3.6.0/bin$ java -version
openjdk version “1.8.0_292”
OpenJDK Runtime Environment (build 1.8.0_292-8u292-b10-0ubuntu1~20.10-b10)
OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)
kenric@oryx-pro:~/gatling-charts-highcharts-bundle-3.6.0/bin$ ./recorder.sh
GATLING_HOME is set to /home/kenric/gatling-charts-highcharts-bundle-3.6.0
And it just sits there with the cursor blinking indefinitely. Any ideas?
Isn’t “Server VM” a build without the graphic libraries?
I don’t know, but I followed the installation instructions for the bundle:
“In order to run Gatling, you need to have a JDK installed. Gatling requires at least JDK8. Then, we recommend that you use an up-to-date version.”
And it appears that both the JRE and JDK are installed:
kenric@oryx-pro:~$ sudo apt-get install openjdk-8-jre
Reading package lists… Done
Building dependency tree
Reading state information… Done
openjdk-8-jre is already the newest version (8u292-b10-0ubuntu1~20.10).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
kenric@oryx-pro:~$ sudo apt-get install openjdk-8-jdk
Reading package lists… Done
Building dependency tree
Reading state information… Done
openjdk-8-jdk is already the newest version (8u292-b10-0ubuntu1~20.10).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
How to install/enable the graphic libraries?
To verify that my Java installation includes GUI support, I installed and successfully ran a Java app called JDiskReport. I notice the difference is it is a .jar file whereas Gatling’s recorder app is called from a shell script. Is my situation unusual? Should I try with JDK 11 instead of 8?
Honestly, that’s the second time we hear of this issue in ~10 year… No idea what happens, in particular if you don’t have any stacktrace in the console.
Should I try with JDK 11 instead of 8?
Well, as I really have no clue, whatever shot in the dark is worth it
After uninstalling I noticed there was one package remaining from a previous install of JDK 11 and it was the headless version, so I wonder if that was somehow being executed instead of JDK 8. Whatever the reason, after purging both versions entirely then installing 11, Gatling Recorder is now working!
And by the way, my guess is that Server VM refers to the JDK part as opposed to the JRE which is bundled with the JDK.
$ java -version
openjdk version “11.0.11” 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.10)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.10, mixed mode, sharing)
Great, so I was right on the spot
Still, I was expecting a stacktrace with a java.awt.HeadlessException, weird you didn’t have anything.