Deliver Your Java Application in One-JAR™!

Copyright 2004-2010 by P. Simon Tuffs, All Rights Reserved.


The following downloads are available in the distribution:

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?

  • For a quick demo of One-JAR in action, download and run one-jar-example-0.97.jar. Run using java -jar
  • If you are ready to start developing a One-JAR archive, download and run one-jar-appgen-0.97.jar. Run using java -jar. This will generate an outline One-JAR Eclipse/Ant project. You will also need to have access to Ant 1.8.0 or later to build the example.
  • Once you are up-to-speed with One-JAR, the one-jar-ant-task-0.97.jar contains just the Java class for the <one-jar> Ant task, as well as a taskdef. (This file is also delivered with the One-JAR Appgen).
  • The minimum set of Java sources and pre-compiled JDK 1.4 classes needed to build a One-JAR archive by hand are contained in one-jar-boot-0.97.jar. One-JAR is very compact: the class files have an uncompressed footprint of around 70KB.

If you like One-JAR then you might want to check out some of the other Open-Source projects developed by
Get One-JAR(TM) at Fast, secure and Free Open Source software downloads soap-stone at Eclipse JAR Plugin Yet Another Compiler Compiler Language