How to make executable java file? (Executable Jar using Eclipse)

Post date: Mar 21, 2011 11:51:11 AM

It sounds like you want to use the "Export JAR File" wizard instead of the "Export Runnable JAR File" wizard. When exporting a runnable jar file, Eclipse attempts to pack everything needed to run the application into a single archive. On the other hand, the "Export JAR File" wizard gives you more control over what is packaged in the archive. You can still create a runnable jar file, but you must make sure to include BouncyCastle.jar on the classpath when you execute the jar. Here are step-by-step instructions:

You should be able to execute the jar file by executing "java -jar myjarfile.jar -classpath BouncyCastle.jar" from a command line.