Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Compilation of HelloWorldSWT fails with "no swt-gtk-4333 in java.library.path"(Trying to build the "Hello World SWT" Application appropriate to Java Development Tutorial fails)
Compilation of HelloWorldSWT fails with "no swt-gtk-4333 in java.library.path" [message #1235856] Sat, 25 January 2014 13:33 Go to next message
Dirk Walter is currently offline Dirk Walter
Messages: 3
Registered: January 2014
Junior Member
Hello,

i am new to this forum. Here my problem:

System:
Ubuntu 13.10 - dist-upgraded today

Eclipse:
Eclipse Standard/SDK

Version: Kepler Service Release 1
Build id: 20130919-0819

java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

When i am trying to compile the "Hello World SWT" Application appropriate to Java Development Tutorial i got the following error:
---------------
Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-gtk-4333 in java.library.path
no swt-gtk in java.library.path
Can't load library: /home/<user>/.swt/lib/linux/x86_64/libswt-gtk-4333.so
Can't load library: /home/<user>/.swt/lib/linux/x86_64/libswt-gtk.so

at org.eclipse.swt.internal.Library.loadLibrary(Library.java:331)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:240)
at org.eclipse.swt.internal.C.<clinit>(C.java:21)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:133)
at HelloWorldSWT.main(HelloWorldSWT.java:10)
-------------------
In different forums there was the suggestion to link the libraries with an:
ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86_64/
But this does not work, because there are not any libraries with an 4333 in their filenames. The list in /usr/lib/jni/ is:

root@mymachine:~# ls -ltra /usr/lib/jni/
insgesamt 1312
-rw-r--r--   1 root root 504768 Jul  2  2013 libswt-pi-gtk-3836.so
-rw-r--r--   1 root root 548896 Jul  2  2013 libswt-gtk-3836.so
-rw-r--r--   1 root root  18568 Jul  2  2013 libswt-gnome-gtk-3836.so
-rw-r--r--   1 root root   6040 Jul  2  2013 libswt-awt-gtk-3836.so
-rw-r--r--   1 root root  47336 Jul  2  2013 libswt-atk-gtk-3836.so
-rw-r--r--   1 root root  56352 Jul  2  2013 libswt-cairo-gtk-3836.so
-rw-r--r--   1 root root  51176 Jul  2  2013 libswt-webkit-gtk-3836.so
-rw-r--r--   1 root root  14464 Jul  2  2013 libswt-glx-gtk-3836.so
drwxr-xr-x   2 root root   4096 Jan 25 12:22 .
drwxr-xr-x 247 root root  69632 Jan 25 12:29 ..


Is there any idea, which is my mistake.
Re: Compilation of HelloWorldSWT fails with "no swt-gtk-4333 in java.library.path" [message #1236629 is a reply to message #1235856] Mon, 27 January 2014 17:52 Go to previous messageGo to next message
Dirk Walter is currently offline Dirk Walter
Messages: 3
Registered: January 2014
Junior Member
Found the answer myself --> http://www.eclipse.org/forums/index.php/m/1235911/#msg_1235911

That is a mistake in documentation

[Updated on: Mon, 27 January 2014 17:53]

Report message to a moderator

Re: Compilation of HelloWorldSWT fails with "no swt-gtk-4333 in java.library.path" [message #1245706 is a reply to message #1236629] Fri, 14 February 2014 06:14 Go to previous message
Fritz Schenk is currently offline Fritz Schenk
Messages: 9
Registered: February 2012
Junior Member
Dirk Walter wrote on Mon, 27 January 2014 12:52
Found the answer myself --> http://www.eclipse.org/forums/index.php/m/1235911/#msg_1235911

That is a mistake in documentation


I had the same problem.Solution works - thanks Smile
Previous Topic:Ctrl-X/C/V not working in text fields
Next Topic:SWT popup menu not working
Goto Forum:
  


Current Time: Sat Oct 25 14:36:37 GMT 2014

Powered by FUDForum. Page generated in 0.01588 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software