VisualVM does not Start on Ubuntu 18.04
Asked Answered
B

1

7

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.

Bathos answered 29/5, 2018 at 14:1 Comment(1)
That looks like a bug in the Ubuntu package. A library is missing, misnamed, in the wrong place, or something. Report it via the Ubuntu LaunchPad tracker.Gradely
B
15

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
Bathos answered 30/5, 2018 at 8:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.