Creating executable JAR file

I’ve been having this problem for a while but was using a “workaround” till I have time to address it.

When I Export an application to a JAR file using Eclipse’s Export and specifying manifest Main-Class to me my application class (that has the main() in it) I get a JAR file but when I try to execute it I get a “Could not find the main class. Program will exit.”. If I copy JgoSWT.jar + JgoSWTSVG.jar + .dll it works fine.

I would like to just send this off as a single JAR file… what am I missing?


When you export your application to a JAR file, does the resulting JAR file include all of the JGo et al classes that you depend on?

Actually, talking about something always helps me figure it out. After I posted this I went and looked inside the generated JAR file and it did not include the JGo class files as I had been including the JGo*.jar files in the Eclipse project.

Removing the JARs in the projects and adding the JGo source to my project cleared up this error.

I also made sure that I had Class-Path: swt.jar in my manifest file too. So this would make it so I only have to include the swt.jar with my jar file.

life is good.