I am using a separately downloaded Eclipse 3M5 on a Debian woody
(stable) system. To make Eclipse start at all I had to use the libgtk2
libraries from some backported gnome 2.2 to get a gtk version >=2.0.6
(now, its 2.2.2).
Now Eclipse runs perfectly (so I have at least one swt app working) as
about any Java application I wrote with it (none using swt).
Now, I want to learn to do stuff with swt and I try to let the
following program run using the swt.jar that came with eclipse:
-----------------------------------------------------------------------
import org.eclipse.swt .widgets.*;
public class Hello {
public static void main(String[] args) {
MessageBox m = new MessageBox(new Shell());
m.setMessage("H ello, World");
m.open();
}
}
-----------------------------------------------------------------------
It compiles good, but as I try to run it, I get the following error:
-----------------------------------------------------------------------
javac -classpath /var/local/java-lib/swt.jar Hello.java
java -classpath /var/local/java-lib/swt.jar:. -D/var/local/java-lib/swt.jar Hello
Exception in thread "main" java.lang.NoCla ssDefFoundError :
org/eclipse/swt/internal/gtk/OS
at org.eclipse.swt .internal.Conve rter.wcsToMbcs( Converter.java: 63)
at org.eclipse.swt .internal.Conve rter.wcsToMbcs( Converter.java: 54)
at org.eclipse.swt .widgets.Displa y.<clinit>(Disp lay.java:112)
at org.eclipse.swt .widgets.Shell. <init>(Shell.ja va:232)
at org.eclipse.swt .widgets.Shell. <init>(Shell.ja va:226)
at org.eclipse.swt .widgets.Shell. <init>(Shell.ja va:180)
at org.eclipse.swt .widgets.Shell. <init>(Shell.ja va:119)
at Hello.main(Hell o.java:5)
-----------------------------------------------------------------------
I suppose there is a problem in finding the right gtk library or
something.
I googled a lot about that but couldn't find anything useful. Any
ideas?
Thankful for help,
TTN