[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Standalone SWT and classpath

Sorry to bother you guys with something so simple, but I'm completely stuck
(and can't find the answer anywhere).

I've made a perfectly functioning standalone SWT app in Eclipse, and this
works fine from inside the IDE.
So I've exported a JAR file from the project, and attempted to run it with
the following command:

C:\>java -jar -cp
g:\eclipse\plugins\org.eclipse.swt.win32_2.1.0\ws\win32\swt.jar -Djava.libra
ry.path=g:\eclipse\plugins\org.eclipse.swt.win32_2.1.0\os\win32\x86
MindMap.jar

Note that the swt.jar is in the classpath, but when running I get this:

Exception in thread "main" java.lang.NoClassDefFoundError:
org/eclipse/swt/widgets/Composite
        at com.fluffybrain.mindmap.Main.<init>(Main.java:19)
        at com.fluffybrain.mindmap.Main.main(Main.java:24)

Now this confuses me - the jar file containing the definition for
org.eclipse.swt.widgets.Composite is in the classpath.
No matter how many different ways I try to get this to work (quotes around
the classpath, the works), it refuses point blank, always with the same
error message.

Does anyone have any ideas?

Cheers,

Nick Maynard
ncm99@xxxxxxxxxxxx