Can't run application - Exception in thread...

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Can't run application - Exception in thread...

Postby pstav123 » Tue Oct 07, 2003 10:52 am

I've followed the manual, and am still having trouble. On a RH 9 system, when the application is run the following stack dump appears:

Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/internal/gtk/OS
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:112)
at ARealTest.main(ARealTest.java:20)

I have the $ECLIPSE/plugins/org.eclipse.swt.gtk_3.0.0/os/linux/x86/ files in my path. Still no good.

I think the manual calls out for:

$ECLIPSE/plugins/org.eclipse.swt.gtk_2.1.1/os/linux/x86/

Any ideas?

Thanks,

--paul
pstav123
 
Posts: 8
Joined: Fri Oct 03, 2003 6:41 am

Re: Can't run application - Exception in thread...

Postby Boris » Tue Oct 07, 2003 11:37 am

pstav123 wrote:Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/internal/gtk/OS
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:112)
at ARealTest.main(ARealTest.java:20)


Looks like the swt.jar is missing from the classpath. You should be able to find it under $ECLIPSE/plugins/org.eclipse.swt.gtk_3.0.0/ws/gtk/

-Boris
Boris
 
Posts: 4
Joined: Sun Oct 05, 2003 11:07 am
Location: Hamburg, Germany

Postby Eric Clayberg » Tue Oct 07, 2003 11:42 am

I've followed the manual, and am still having trouble. On a RH 9 system, when the application is run the following stack dump appears:

Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/internal/gtk/OS
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:112)
at ARealTest.main(ARealTest.java:20)

I have the $ECLIPSE/plugins/org.eclipse.swt.gtk_3.0.0/os/linux/x86/ files in my path. Still no good.

The OS class is in the "swt-pi.jar" file located in the "plugins/org.eclipse.swt.gtk_3.0.0/os/linux/x86/" directory.

I think the manual calls out for:

$ECLIPSE/plugins/org.eclipse.swt.gtk_2.1.1/os/linux/x86/

There is also a note there to substitute "3.0.0" for "2.1.1", if you are using Eclipse 3.0.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Postby pstav123 » Tue Oct 07, 2003 12:20 pm

Now I'm getting:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-pi-gtk-3019 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1403)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:832)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:108)
at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:19)
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:112)
at ARealTest.main(ARealTest.java:20)


The OS class is in the "swt-pi.jar" file located in the "plugins/org.eclipse.swt.gtk_3.0.0/os/linux/x86/" directory.


In my 'OS' directory I have:

[pstav@pslinux eclipse]$ ll plugins/org.eclipse.swt.gtk_3.0.0/os/linux/x86/
total 568
-rwxr-xr-x 1 pstav pstav 43319 Aug 28 18:31 libswt-atk-gtk-3019.so
-rwxr-xr-x 1 pstav pstav 10833 Aug 28 18:31 libswt-gnome-gtk-3019.so
-rwxr-xr-x 1 pstav pstav 190514 Aug 28 18:31 libswt-gtk-3019.so
-rwxr-xr-x 1 pstav pstav 57156 Aug 28 18:31 libswt-mozilla-gtk-3019.so
-rwxr-xr-x 1 pstav pstav 259833 Aug 28 18:31 libswt-pi-gtk-3019.so

In my 'WS' directory I have the jar files:

[pstav@pslinux eclipse]$ ll plugins/org.eclipse.swt.gtk_3.0.0/ws/gtk/
total 908
-rw-rw-r-- 1 pstav pstav 818215 Aug 28 18:31 swt.jar
-rw-rw-r-- 1 pstav pstav 58250 Aug 28 18:31 swt-mozilla.jar
-rw-rw-r-- 1 pstav pstav 37539 Aug 28 18:31 swt-pi.jar

I've put the jars in the build ( and by default run-time classpath in Eclipse ) and
I've also read everything I can find, and have tried putting both directories into my path. I think the PDF said this would happen if the SWT run-time couldn't find the DLLs. Well on Linux we're looking for the SO's, right? So I put them in the path.. still no joy.

I'm still stuck.

Thanks,

--paul
pstav123
 
Posts: 8
Joined: Fri Oct 03, 2003 6:41 am

Postby admin » Tue Oct 07, 2003 7:26 pm

For Linux you should place .so in directory that is in LD_LIBRARY_PATH.
I don't have much experience with Linux however, so can not tell you "man this", but I am sure that there is such man page. ;-)
admin
Moderator
 
Posts: 166
Joined: Thu Jul 24, 2003 12:25 am

Postby Boris » Tue Oct 07, 2003 11:07 pm

admin wrote:For Linux you should place .so in directory that is in LD_LIBRARY_PATH.
I don't have much experience with Linux however, so can not tell you "man this", but I am sure that there is such man page. ;-)


I think setting java.library.path (via -D) when starting the JavaVM should work as well.

-Boris
Boris
 
Posts: 4
Joined: Sun Oct 05, 2003 11:07 am
Location: Hamburg, Germany

Postby pstav123 » Wed Oct 08, 2003 4:41 am

Thanks folks...

For Linux you should place .so in directory that is in LD_LIBRARY_PATH.


This works to cure the library not found error.

--paul
pstav123
 
Posts: 8
Joined: Fri Oct 03, 2003 6:41 am


Return to SWT Designer

Who is online

Users browsing this forum: Google [Bot] and 1 guest