Generated Exe Specifications

Functions of generated exe files


Overview

Generated exe is not just a wrapped java program, but it provides more advanced functions. You can find these functions on this page.


Find JRE Itself

Generated exe will find JRE on host by many ways:

  • From registry (Windows)
  • From 'java' symbol link to find JRE directory (Linux)
  • From environment JAVA_HOME or JRE_HOME (Windows and Linux)
  • From specified path in configuration file (Windows and Linux)

 For details of finding JRE, see Find JRE Itself page.


Class Path

Jar2Exe supports to pack depended jar files into exe file, those embedded jar files are included in classpath already. For jar files outside of generated exe file, it is supported to set 'class path' by many ways:

  • From environment CLASS_PATH and CLASSPATH
  • From a configure item 'classpath' in configuration file to specify one or more 'jar files'
  • From a configure item 'libs' in configuration file to specify a 'directory' which contains jar files

 For details of classpath, see Class Path page.


Force CWD

Generated exe changes its "Current Working Directory" to a specified directory before it begins to run, ignoring the current directory where it is started. The "Current Working Directory" will affect file operations with a Relative Path.

Use a configure item 'forcecwd' to enable Force CWD. For Service type of Applications, Force CWD is enabled by default.

 For details of Force CWD, see Force CWD page.


Stdout Redirect

System.out and System.err can be redirected to a file or a pipe. This is useful for Windows GUI type and Service type which have no console window to print messages.

 For details of Stdout Redirect, see Stdout Redirect page.


Class Protected

If "protect" option selected during exe generation process, the classes and resources cannot be extracted from the generated exe files. Generated exe uses a special ClassLoader to load protected resources when it runs.

 For details of class protection, see Class Protected page.


Run as Service

Service type of application can run as a service on Windows and Linux. Use parameter "/install" to install it and the program can automatically start up when OS starts up, and it will continue to run when user log out.

 See Run as Service page for details of Service.


Event Log

 This function is supported on Windows only.

Generated exe files provide an interface to add log records to system event log.

 See Event Log page for details of Event Log.


System Tray

 This function is supported on Windows only.

System Tray function uses the "Program Icon" to show as System Tray Icon.

 See System Tray page for details of Event Log.


Splash Window

 This function is supported on Windows only.

Windows GUI type of application supports to show a Splash Window when program starts.

 See Splash Window page for details of Splash Window.