Hello,
I have an SWT app that works great when run using the run command in
Eclipse on Ubuntu Gusty Gibbon with the java -version command returning
the following:
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)
Unfortunately, I can't create a working jar out of it to save my life.
Basically, I have a working program that is trapped in Eclipse. After
creating my jar (using the Eclipse "Export" to jar technique as well as
the Java javac method with the command jar cmf manifest1.txt
SunMouseDatabase1.jar MouseDatabaseApp.class ./lib/* ) and attempting to
run it with the following command:
java -jar SunMouseDatabase1.jar
I get this error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no
swt-pi-gtk-3236 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1030)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:123)
at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:22)
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:126)
at MouseDatabaseApp.main(MouseDatabaseApp.java:346)
After poking around my system I was able to find a file called
libswt-pi-gtk-3236.so, but I'm not familiar with the ".so" file type.
I've put that file in my lib directory and pointed to it in the
Class-Path of my Manifest file, but I get the same error whether that is
in there or not.
the Manifest.mf file in the jar is as follows:
Manifest-Version: 1.0
Class-Path: lib/derby.jar lib/iText-2.0.8.jar lib/jcommon-1.0.12.jar
lib/jfreechart-1.0.9-experimental.jar lib/jfreechart-1.0.9-swt.jar
lib/opencsv-1.9.jar lib/swtgraphics2d.jar
lib/org.eclipse.swt.gtk.linux.x86_3.2.2.v3236.jar
lib/org.eclipse.swt_3.2.2.v3236b lib/libswt-pi-gtk-3236.so
Created-By: 1.6.0_03 (Sun Microsystems Inc.)
Main-Class: MouseDatabaseApp
The Class-Path line is all on one line with no line breaks. I've been
working and googling this problem over the past two days with no luck,
and would appreciate any help. Thanks.