VisualVM does not start after installing it with sudo apt install visualvm
on Ubuntu 18.04. It simply does nothing.
Starting it with visualvm -J-Djava.util.logging.config.file=logging-jconsole.properties
yields the following error message:
java.lang.UnsatisfiedLinkError: no splashscreen in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at java.awt.SplashScreen$1.run(SplashScreen.java:124)
at java.awt.SplashScreen$1.run(SplashScreen.java:122)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.SplashScreen.getSplashScreen(SplashScreen.java:121)
at org.netbeans.core.startup.Splash.<init>(Unknown Source)
at org.netbeans.core.startup.Splash.getInstance(Unknown Source)
at org.netbeans.core.startup.Main.start(Unknown Source)
at org.netbeans.core.startup.TopThreadGroup.run(Unknown Source)
at java.lang.Thread.run(Thread.java:748)
The problem persists after installing the JDK with sudo apt install default-jdk
.
I figured it out myself. It had the wrong version of OpenJDK installed. The "default-jdk" package on Ubuntu seems to be the "headless" version (openjdk-8-jdk-headless). In order to get VisualVM to work I uninstalled the headless version of the OpenJDK and installed OpenJDK minus headless.
sudo apt remove openjdk-8-jdk-headless
sudo apt install openjdk-8-jdk
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With