Exe4j Command Line Compiler
exe4j's command line compiler exe4jc.exe
can be found in the
bin
directory of your exe4j installation. It operates on any
config file with extension .exe4j
that has been produced with
the exe4j wizard. (exe4j.exe
). The exe4j command line compiler is
invoked as follows:
exe4jc [OPTIONS] [config file]
A quick help for all options is printed to the terminal when invoking
exe4jc --help
A typical run of the exe4j command line compiler looks like this:
exe4j version X.Y, built on 20YY-MM-DD Unregistered evaluation version Loading config file myapp.exe4j Deleting temporary directory Compiled executable for myapp in 0.8 seconds.
Command line compiler options
The exe4j command line compiler has the following options:
-h or --help
Displays a quick help for all available options.-V or --version
Displays the version of exe4j in the following format:exe4j version 1.0, built on 2002-10-05
-v or --verbose
Enables verbose mode. In verbose mode, exe4j prints out information about internal processes. If you experience problems with exe4j, please make sure to include the verbose terminal output with your bug report.-q or --quiet
Enables quiet mode. In quiet mode, no terminal output short of a fatal error will be printed.-t or --test
Enables test mode. In test mode, no executable will be generated in the directory for the executable.-w or --fail-on-warning
If a warning is printed and this option is specified, the build will fail at the end. It does not fail immediately, so you can see all warnings and fix them all at once. The exit code in this case is 2 instead of 1 for an actual error and 0 for a successful execution.-L or --license=KEY
Update the license key on the command line. This is useful if you have installed exe4j on a headless system and cannot start the GUI.KEY
must be replaced with your license key.-x or --require-license
By default, exe4j will fall back to evaluation mode if the license key is not valid. If you want the compilation to fail instead, you can specify this option.-r STRING or --release=STRING
override the application version defined in the "Executable info->Version info" step.STRING
must be replaced with the desired version number. The version number can only contain numbers and dots.-d STRING or --destination=STRING
override the destination directory for the executable.STRING
must be replaced with the desired directory. If the directory contains spaces, you must enclose STRING in quotation marks.Note that this option does not affect the interpretation of relative paths defined by the distribution source directory and the output directory as specified in the "Application info" step of the exe4j wizard.
Overriding settings at build time
In order to facilitate the use of exe4j in automated build processes, the destination directory for the executable and the version text line of the splash screen can be overridden with command-line options. Because the file format of exe4j's config files is in XML format, you can achieve arbitrary customizations by replacing tokens or by applying XSLT stylesheets to the config file.
Relative resource paths
If you would like to use relative paths for the distribution directory, the bitmap and icon files (for example, for automated build processes in distributed environments) you can change these values manually in the config file.
If the mentioned paths are relative, they are interpreted relative to the location of the config file.