You can add Jarx to your own Java programs and provide a better experience to the user.
You might think distributing only a JAR file to Windows users is enough. Unfortunately, a JAR file has some serious drawbacks:
Jarx overcomes all these problems.
When you distribute a Java 1.1 program, Jarx has even more advantages:
By associating the .jar file extension with the jarx program, every JAR file will become "executable". The JAR file can be double clicked, selected from the Start menu etcetera. To have a executable JAR file, it must contain a manifest file. You can find more information about the manifest file in the JAR File Specification.
A file with the .jarx file extension is a configuration file, just like the manifest file. See below for the format. In this file you can describe which JAR file to load and which class contains the main method to execute. You can start your Java software by double clicking a jarx configuration file.
If your Java program is document-oriented, you can associate your own file extension with jarx. Jarx will then execute your JAR file with the document as a parameter. A document can be anything, including, for example, an image. You can do this by making a default.jarx file in the same directory as the Jarx executable. See below for more information about the .jarx file format.
The Jarx configuration file, with the .jarx extension, gives the Jarx program information about which JAR file to load and which class to execute.
The Jarx configuration file is a text file. Every line starts with a name, followed by a colon ':', folowed by one or more spaces, followed by the value.
| Name | Value | jar-file | (Relative) location of the JAR file. | Obligatory | main-class | The full class name of the class containing the static void main method, just like in a manifest.mf file | Obligatory | class-path | The classpath. When left out, the JAR file will be the only entry in the classpath. | Optional | version-min | Minimum supported Java version. When the installed version is older, the user will be asked to download the newest version. The value must have the format <number>.<number>. | Optional |
|---|
An example Jarx configuration file is:
jar-file: GameOfLife.jar main-class: org.bitstorm.gameoflife.StandaloneGameOfLife version-min: 1.1
You can download the Game of Life to see how Jarx works with other software. On the Game of Life source code page, you can find an installer script for the free NSIS installer program.
You can download the plain jarx.exe or download and install the end user installer from the Jarx web page:
You are allowed to distribute the Jarx program (jarx.exe) with your freeware.
In this context, freeware is defined as conforming to these three conditions:
For further questions, please contact Edwin Martin <edwin@bitstorm.org>.