Jar2Exe is a redistribute solution for java programs. It makes it easy to start your java program. Generated binary file has many advanced features, such as "run as service", it is not only a java program.
Find JRE on host by itself
Generated binary executive will find JRE on host:
- Search JRE from System registry for SUN JRE and IBM JRE.
- Search JRE from local bundled 'jre' directory.
- Search JRE from JAVA_HOME or JRE_HOME environment variable.
- On Linux, search JRE by following 'which java' to 'java' symbol link
- The search ways can be disabled or reordered.
Java version check before execute
Check java version greater and lower than a version:
- Check java version must be equal or greater than a version. (minjre)
- Check java version no higher than a version. (maxjre)
- To check java version is optional, it can be disabled.
Add an icon and version information to generated binary
To add icon and version to resource of generated binary executive file:
- One or more icons can be added into generated binary file.
- It is supported to set a file version and product version.
- It is supported to set a group of copy right descriptions.
Messages are customizable
Error messages can be customized, you can add more tips to your customers. Such as:
- Java runtime environment (JRE) not found on host
- Main class (entrypoint of program) not found or not valid.
- Service install fail because of no privilege.
- Other more than a dozen messages.
Jar2Exe and generated binary file has a wide compatibility:
- Jar2Exe supports to generate binary file for Windows and Linux and Mac OS X.
- Jar2Exe supports to generate 32 bits and 64 bits binary files.
- Generated binary files run with JRE from 1.2 to 1.7.
- Generated binary files are VC runtime library independent.
- Generated binary files for Linux are GLIBC independent.
Redirect System.out, System.err to a file or pipe
By default, stdout redirect is not enabled.
- System.out and System.err can be redirected separately.
- Stdout, stderr can be redirected to a disk file or system device such as PRN, NUL, /dev/null etc.
- Stdout, stderr can be redirected to a pipe, though which the output will be stdin of another program.
Show a splash screen when program is starting up
Show a splash screen even run with JRE earlier than 1.5.
- Automatically close when first window appears.
- Window title can be customized, which will be shown in the button on taskbar.
- The button on taskbar can be hidden with an empty title.
- The close of splash screen can be controlled through integrate API.
System icon tray supported
It is supported to show a tray icon on taskbar. This is useful for a mini tool program on desktop.
- Show a system icon tray with balloon style.
- The image is changeable, so it can show a moving icon by changing its image frame by frame.
- Mouse event can be caught through integrate API.
- Show a popup menu on mouse event.
Set "Current Working Directory" with an absolute or relative path
The "Current Working Directory" will affect file operations with a relative path. If a file is created with a filename without a directory path, the file will be created in the "current working directory":
- If the working directory is set with a relative path, it is based on the binary file's path.
Generated binary executive is configurable with rich configure items
Parameters can be configured to generated binary executive, such as Java VM parameters, system properties, environment variables, JRE path, JRE search order, stdout redirects etc:
- The configuration can be put internally in the binary file.
- The configuration can be outside in a configuration file, or both.
- Config Assistant can help to edit the configuration.
- The configuration file outside of binary file can be disabled by internal config.
Singleinstance and advanced singleinstance
Singleinstance is to control running instances of the same program:
- Support singleinstance feature to control running instances, default 'false' means no limit.
- Support 'singleinstance true' to allow only one instance running at the same time.
- Support 'singleinstance custom' to enable communication between instances and let java program to control the instances.
Encrypt and protect java program to prevent it from being extracted
Encrypt and hide java program into generated binary file, then it cannot be extracted:
- No temporary file will be created when protected program runs.
- Both classes and other resource files can be protected.
- In most cases, program need not to be modified in order to be compatible with protection.
- In certain cases, if a program uses ClassLoader, it may be required to use another ClassLoader instead to be compatible with protection.
Run as Service without special coding
Jar2Exe can generate Service type of binary file for Windows, Linux and Mac OS X:
- Without special coding, any java program can run as service.
- Automatically or manually startup when system startup.
- It can install and uninstall itself at command line.
- Fixed startup arguments can be added when install service at command line.
- Get shutdown event through integrate API.
- On Windows, PAUSE/CONTINUE is supported.
Depended jar files can be embedded into binary executive
Wrap depended jar files into a single binary executive file. Those embedded jar files are included in classpath already:
- Classes in embedded jar files are loaded internally without being written to temporary file.
- Embedded jar files can be selected to be protected if encrypt or hide option selected for main jar file.
Jar2Exe can run as a Wizard window or Command line tool
Jar2Exe can run in Wizard mode and Command line mode:
- Run Jar2Exe from shortcuts or from command line without arguments, it will run in wizard mode.
- Run Jar2Exe with arguments, it will run in command line mode.
- At the last step of wizard, an equivalent command line string can be created for convenience.
It is convenient to get help at any time:
- There is a help button on each step of wizard to tell you the usage.
- Type "j2ewiz /?" at command line to get tips of command line mode.
- Write to email@example.com for any topic at any time.