Trouble Exporting SWT Application [message #650444] |
Mon, 24 January 2011 23:16 |
Jonah Bron Messages: 32 Registered: October 2010 Location: California |
Member |
|
|
Trying to export a .jar of my standalone SWT application, but running into some trouble. When I run the exported jar, I get this error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Display
It's apparent to me that Java isn't being told where the SWT library is. When I open up my jar, I see the library where it's supposed to be (in the lib/ sub-directory). Here's my MANIFEST.MF:
Manifest-Version: 1.0
Class-Path: lib/swt.jar
Main-Class: ns.MyApp
So what's the problem? How can I get it to know that SWT is there? Thanks for your help
[Updated on: Mon, 24 January 2011 23:17] Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: Trouble Exporting SWT Application [message #650829 is a reply to message #650444] |
Wed, 26 January 2011 18:06 |
Jonah Bron Messages: 32 Registered: October 2010 Location: California |
Member |
|
|
Okay, found out that one must put all libraries into the one class-path. But, if I put the 32-bit library before the 64-bit library, it gives me the "cannot load 32 bit library on 64 bit JVM" error. So I reversed their positions, and it worked. But I'm going to assume that the reverse of that error will come up if I try to run it on a 32-bit system (yes, my computer is 64-bit). How can I get it to automatically select the library it needs?
Edit: and what about media (i.e. images)? Can those be kept in the jar, or do they have to be outside?
[Updated on: Wed, 26 January 2011 18:13] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04244 seconds