How do you run an SWT application outside of Eclipse

M

Mylo

I created a SWT application using the Eclipse IDE, and it runs well.
However, when I export the application to a jar file, it does not run
correctly.

When I run the program with the following line:
java -jar ldaptool.jar

I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError:
org/eclipse/swt/custom/VerifyKeyListener
at Main.main(Main.java:11)

I looked at the following thread
(http://groups.google.com/group/comp...ipse+swt+command+line&rnum=1#4abbacd8717ac318),
but moving the swt.jar and dll files into the same directory as the jar
file did not change the error message.

I'm not sure if I need to be setting the classpath. I've tried a
couple of classpaths which included the swt.jar, but I still received
the same errors. Any help would be appreciated.

thanks.
mylo.
 
I

IchBin

Mylo said:
I created a SWT application using the Eclipse IDE, and it runs well.
However, when I export the application to a jar file, it does not run
correctly.

When I run the program with the following line:
java -jar ldaptool.jar

I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError:
org/eclipse/swt/custom/VerifyKeyListener
at Main.main(Main.java:11)

I looked at the following thread
(http://groups.google.com/group/comp...ipse+swt+command+line&rnum=1#4abbacd8717ac318),
but moving the swt.jar and dll files into the same directory as the jar
file did not change the error message.

I'm not sure if I need to be setting the classpath. I've tried a
couple of classpaths which included the swt.jar, but I still received
the same errors. Any help would be appreciated.

thanks.
mylo.
This link should help you out..

http://www.developer.com/java/other/article.php/10936_3330861_2

--


Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,150
Latest member
MakersCBDReviews
Top