Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netbeans: java.lang.UnsatisfiedLinkError: no splashscreen in java.library.path:

Tags:

java

netbeans

I am trying to launch Netbeans but it is not opening. I tried using the command line too. But in command line I got the following error:

java.lang.UnsatisfiedLinkError: no splashscreen in java.library.path: [/usr/java/packages/lib, /usr/lib/x86_64-linux-gnu/jni, /lib/x86_64-linux-gnu, /usr/lib/x86_64-linux-gnu, /usr/lib/jni, /lib, /usr/lib]
    at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2670)
    at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:806)
    at java.base/java.lang.System.loadLibrary(System.java:1909)
    at java.desktop/java.awt.SplashScreen$1.run(SplashScreen.java:134)
    at java.desktop/java.awt.SplashScreen$1.run(SplashScreen.java:132)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
    at java.desktop/java.awt.SplashScreen.getSplashScreen(SplashScreen.java:131)
    at org.netbeans.core.startup.Splash.<init>(Splash.java:122)
    at org.netbeans.core.startup.Splash.getInstance(Splash.java:60)
    at org.netbeans.core.startup.Main.start(Main.java:271)
    at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:98)
    at java.base/java.lang.Thread.run(Thread.java:830)
like image 207
Future King Avatar asked Mar 19 '20 20:03

Future King


2 Answers

I faced the same issue in Ubuntu 20.04 and just got fixed after referring to https://github.com/kaikramer/keystore-explorer/issues/130

The problem is missing JRE.

sudo apt-get install openjdk-14-jre

It worked after the installation of JRE.

like image 105
Thirumal Avatar answered Nov 15 '22 01:11

Thirumal


The issue https://github.com/kaikramer/keystore-explorer/issues/130 referred by @Thirumal says that

You probably had the headless jre package (openjdk-X-jre-headless) installed, which only works for Java software that needs no keyboard, mouse or display.

This was my problem, I executed:

apt list --installed | grep jdk

openjdk-11-jdk-headless/focal-updates,focal-security,now 11.0.9.1+1-0ubuntu1~20.04 amd64 [installed]
openjdk-11-jre-headless/focal-updates,focal-security,now 11.0.9.1+1-0ubuntu1~20.04 amd64 [installed,automatic]

So I've just installed:

sudo apt install openjdk-11-jdk

And:

apt list --installed | grep jdk

openjdk-11-jdk-headless/focal-updates,focal-security,now 11.0.9.1+1-0ubuntu1~20.04 amd64 [installed,automatic]
openjdk-11-jdk/focal-updates,focal-security,now 11.0.9.1+1-0ubuntu1~20.04 amd64 [installed]
openjdk-11-jre-headless/focal-updates,focal-security,now 11.0.9.1+1-0ubuntu1~20.04 amd64 [installed,automatic]
openjdk-11-jre/focal-updates,focal-security,now 11.0.9.1+1-0ubuntu1~20.04 amd64 [installed,automatic]

After this Netbeans started perfectly.

But, I guess I could have just installed the openjdk-11-jre.

like image 30
Felipe Windmoller Avatar answered Nov 15 '22 00:11

Felipe Windmoller