Eclipse cannot start "java.lang.UnsatisfiedLinkError: no swt-pi-gtk"

Bug #975560 reported by 8200
116
This bug affects 28 people
Affects Status Importance Assigned to Milestone
swt-gtk (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Hi,

I am using ubuntu 12.04 amd64 and with the latest updates eclipse doesn't work anymore.

java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
 no swt-pi-gtk-3740 in java.library.path
 no swt-pi-gtk in java.library.path

My java version:
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)

Already tried the following:

"sudo apt-get install libswt-gtk-3-java
[sudo] password for arthur:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libswt-gtk-3-java is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded."

Revision history for this message
8200 (8200) wrote :
Revision history for this message
Henry (henrywest93) wrote :

I'm having the exact same issue.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in swt-gtk (Ubuntu):
status: New → Confirmed
Revision history for this message
8200 (8200) wrote :

Thank you Henry, good to know that I'm not allone with the problem.

Maybe we should add eclipse to the affected package - but I don't know how...

Revision history for this message
أحمد المحمودي (Ahmed El-Mahmoudy) (aelmahmoudy) wrote : Re: [Bug 975560] [NEW] Eclipse cannot start "java.lang.UnsatisfiedLinkError: no swt-pi-gtk"

On Fri, Apr 06, 2012 at 10:17:31PM -0000, 8200 wrote:
> java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
> no swt-pi-gtk-3740 in java.library.path
> no swt-pi-gtk in java.library.path
> [...]
> "sudo apt-get install libswt-gtk-3-java
---end quoted text---

  You need to install 'libswt-gtk-3-jni' package

--
 ‎أحمد المحمودي (Ahmed El-Mahmoudy)
  Digital design engineer
 GPG KeyID: 0xEDDDA1B7
 GPG Fingerprint: 8206 A196 2084 7E6D 0DF8 B176 BC19 6A94 EDDD A1B7

Revision history for this message
Duane Hinnen (duanedesign) wrote :

I found a workaround by copying /usr/lib/jni/libswt-*3740.so to ~/.swt/lib/linux/x86_64/

Revision history for this message
John Thorp (2-ebay) wrote :

I was having a very similar error in 12.04:
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
 no swt-gtk-3740 in java.library.path
...

Duane's work around worked for me also, with the following minor variation since I have a 32 bit machine:
$ cp /usr/lib/jni/libswt-*3740.so ~/.swt/lib/linux/x86

Thanks for your help!

Revision history for this message
Simon Vass (svass) wrote :

Workaround working here also Ubuntu 12.04 64-bit

Revision history for this message
Jacobus Erasmus (jacobus) wrote :

I have the same problem my workaround

$ rm ~/.swt/lib/linux/x86_64
$ ln -s /usr/lib/jni ~/.swt/lib/linux/x86_64

Revision history for this message
أحمد المحمودي (Ahmed El-Mahmoudy) (aelmahmoudy) wrote :
Revision history for this message
أحمد المحمودي (Ahmed El-Mahmoudy) (aelmahmoudy) wrote :

zekr is also using swt-gtk, yet I am not experiencing this problem of yours. So I am marking this bug as affecting eclipse rather than swt-gtk

Revision history for this message
Henrik Heino (henu) wrote :

Duane's workaround fixed the problem for me. Thanks :)

Revision history for this message
Ronald Rios (rdrios) wrote :

Thanks Duante it works!!! Hope they fixed soon.

Revision history for this message
Nick K. (ph4ntome) wrote :

I had the same problem too. The fix indeed works! (remember first to remove the directory)

Revision history for this message
michael thorne (mxtbcca) wrote :

Thanks for the post, to remove the directory used:

$ rmdir ~/.swt/lib/linux/x86_64

Revision history for this message
Scott Severance (scott.severance) wrote :

I believe Mikolaj Lechtanski's workaround is more efficient. It was originally posted here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=663734#31

> 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

Revision history for this message
vicis (vicianm) wrote :

In my case I am running 64bit Debian Wheezy and I tried to run 32bit Eclipse on 32bit Java 1.7.
Installing 32bit GTK libraries solved my problem:

sudo apt-get install ia32-libs-gtk

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.