[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Re: Howto export swt to jar

Canned wrote:
Paul A. Rubin schreef:

1.  Do you have swt.jar and the required swt.whatever.dll in the
directory in which you're trying to run program.jar?

I've already copied swt.jar to the same directory as program.jar and I
don't know if I need any dll to execute my program. I've added
org.eclipse.swt to my build path, added swt.jar to libraries, and in
order and export all items are checked (swt.jar, jre system library,
org.eclipse.swt) but still don't work.

Assuming you're on Windows, you will need the swt DLL file to execute the program outside Eclipse. Step 5a of
http://blog.redditech.com/professional/solution-to-problem-running-swt-app-from-jar/
mentions it (although they say you can pull it out of swt.jar, which is news to me -- my copy of swt.jar does not contain it). The DLL file came with the SWT package, so I imagine it's on your system somewhere. This probably has nothing to do with the NoClassDefFoundError though.


2.  If you execute java -cp "swt.jar;." -jar program.jar, does that work?

Still give me the same error.

Hmm. How about java -cp "./program.jar;./swt.jar;." editor.editor?

/Paul