Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Linux/Windows SWT issues
Linux/Windows SWT issues [message #437161] Sat, 29 May 2004 20:38 Go to next message
Eclipse UserFriend
Originally posted by: frenchie.blackapache.net

I've been working on a SWT program for a little while now, i've gotten
pretty far with development under windows, but i would like to do some
testing under linux. I exported and imported the project form windows to
linux, edited where eclipse looked for SWT. And my program complies just
fine. However, when i go to run it i get this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no
swt-pi-gtk-2136 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:10 8)
at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:19)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:4 82)
at org.eclipse.swt.widgets.Display.create(Display.java:469)
at org.eclipse.swt.graphics.Device.<init>(Device.java:111)
at org.eclipse.swt.widgets.Display.<init>(Display.java:303)
at org.eclipse.swt.widgets.Display.<init>(Display.java:299)
at jgpgfe.main(jgpgfe.java:12)

Can someone please tell me what i'm doing wrong?

Thanks in advance,
bryce
Re: Linux/Windows SWT issues [message #437163 is a reply to message #437161] Sat, 29 May 2004 21:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: swt.cloudnine.net.nz

On Sat, 29 May 2004 20:38:02 +0000, Bryce wrote:

> I've been working on a SWT program for a little while now, i've gotten
> pretty far with development under windows, but i would like to do some
> testing under linux. I exported and imported the project form windows to
> linux, edited where eclipse looked for SWT. And my program complies just
> fine. However, when i go to run it i get this error:

Sure,

You need to tell it where the linux .so files are. e.g:
-Djava.library.path=/whereever/you/have/youre/sos/

The standard M9 install has them here: <your eclipse
dir>/plugins/org.eclipse.swt.gtk_3.0.0/os/linux/x86/

Cheers,
Neil
Re: Linux/Windows SWT issues [message #437164 is a reply to message #437161] Sat, 29 May 2004 21:24 Go to previous message
user is currently offline userFriend
Messages: 296
Registered: July 2009
Senior Member
Bryce wrote:
> I've been working on a SWT program for a little while now, i've gotten
> pretty far with development under windows, but i would like to do some
> testing under linux. I exported and imported the project form windows to
> linux, edited where eclipse looked for SWT. And my program complies just
> fine. However, when i go to run it i get this error:
>
> Exception in thread "main" java.lang.UnsatisfiedLinkError: no
> swt-pi-gtk-2136 in java.library.path
> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491)
> at java.lang.Runtime.loadLibrary0(Runtime.java:788)
> at java.lang.System.loadLibrary(System.java:834)
> at org.eclipse.swt.internal.Library.loadLibrary(Library.java:10 8)
> at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:19)
> at org.eclipse.swt.widgets.Display.createDisplay(Display.java:4 82)
> at org.eclipse.swt.widgets.Display.create(Display.java:469)
> at org.eclipse.swt.graphics.Device.<init>(Device.java:111)
> at org.eclipse.swt.widgets.Display.<init>(Display.java:303)
> at org.eclipse.swt.widgets.Display.<init>(Display.java:299)
> at jgpgfe.main(jgpgfe.java:12)
>
> Can someone please tell me what i'm doing wrong?
>
> Thanks in advance,
> bryce
>

NOTE: For some platforms, such as GTK, more than one jar is required to
run SWT (on GTK there is a swt.jar and a swt-pi.jar and a
swt-mozilla.jar file). In this case all of the required jars must be
added to the class path. This is done by repeating the steps above for
each jar file. All jar files are located in the same directory/folder.

the Note is from the Standalone SWT Example Tutorial. for more info, in
M9, click Help-Welcome; click build a standalone SWT application; on the
Standalone SWT Example page, click the question mark in a circle to the
right of Configure the Java Project.

good luck
norwood sisson
Previous Topic:To sub-class or not to sub-class
Next Topic:Unable to use setSelection() on a List control, after window is created/shown (it has no effect)
Goto Forum:
  


Current Time: Tue Sep 24 04:39:02 GMT 2024

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

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

Back to the top