Deliver Your Java Application in One-JAR™! Copyright 2004-2007 by P. Simon Tuffs, All Rights Reserved.
http://www.simontuffs.com

Downloads

The following downloads are available in the distribution:

DownloadDescriptionExecutable?
one-jar-appgen-0.97.jar The One-JAR Application Generator, delivered as a runnable One-JAR application. Requires Ant for rebuild. Contains source-code for the example application, and everything Ant that you need to start building testable One-JAR applications with/without Eclipse.Yes
one-jar-example-0.97.jar A test-case for various scenarios using One-JAR to load resources, URL's and classes. Contains source code for the examples.Yes
one-jar-dll-0.97.jar An example of using Windows Native Libraries (DLL's) with One-JAR. Contains C/C++ source code and a mingw make setup.Yes
one-jar-ant-task-0.97.jar The Ant taskdef code to support a <one-jar> task. Also contains XML definitions for the Ant taskdef, and a macro version of a one-jar builder. Contains source code for the Ant task.No
one-jar-boot-0.97.jar The low-level JarClassLoader and other One-JAR bootstrap mechanisms Contains source-code for the One-JAR bootstrap classes.No
one-jar-sdk-0.97.jar (Deprecated) The Software Developer Kit, delivered as a self-extracting One-JAR application. Requires Ant for rebuild. Contains source-code for the example application, and everything Ant that you need to start building One-JAR applications.Yes

Note: these executable Jar files are command-line tools: do not try to execute them on Windows by double-clicking the file since you may get unexpected results (silent execution). Open a command shell and execute them using the java -jar command.

If you wish to double-click and launch a .jar file as a command-line window you can apply the following file-association to your Windows system. With Administrator privileges:

C:\> assoc .jar=jarfile
C:\> ftype jarfile=cmd.exe /k java.exe -jar "%1" %*
This basically associates .jar files with java.exe through a command window which will remain on exit. Alternatively, to bypass the command window:
C:\> assoc .jar=jarfile
C:\> ftype jarfile=javaw.exe -jar "%1" %*

You might also find the JarFix tool to be useful.

Which One Do I Need?