What is the reason for the following error I am having:
Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load SWT library.
I am using Eclipse 3.5 SE on Ubuntu 9.04 Jaunty.
How can I resolve this error?
I had same problem with Oracle Java 7 and Eclipse on 32-bit system.
libswt-gtk-3.6-java
and libswt-gtk-3.6-jni
were already installed. What helped:
cd ~/.swt/lib/linux/x86
ln -s /usr/lib/jni/* .
Maybe this can be done reconfiguring Java alternatives or what.
I believe Mikolaj Lechtanski's workaround is more elegant.
create or edit /etc/eclipse.ini
Paste inside:
-vmargs -Djava.library.path=/usr/lib/jni
exit
make sure the file is readable:
sudo chmod 755 /etc/eclipse.ini
This means the native libraries could not be found.
Either you have 32-bit libraries and you are running on a 64-bit machine or vice-versa.
also make sure you have the -Djava.library.path=
set properly
See this page on how to run outside of eclipse
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