Ubuntu

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

Reported by 8200 on 2012-04-06
116
This bug affects 28 people
Affects Status Importance Assigned to Milestone
swt-gtk (Ubuntu)
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."

Henry (henrywest93) wrote :

I'm having the exact same issue.

Launchpad Janitor (janitor) wrote :

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

Changed in swt-gtk (Ubuntu):
status: New → Confirmed
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...

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

Duane Hinnen (duanedesign) wrote :

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

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!

Simon Vass (svass) wrote :

Workaround working here also Ubuntu 12.04 64-bit

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

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

Henrik Heino (henu) wrote :

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

Ronald Rios (rdrios) wrote :

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

Nick K. (ph4ntome) wrote :

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

michael thorne (mxtbcca) wrote :

Thanks for the post, to remove the directory used:

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

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

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  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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