Jar2Exe Command Line

Command Line mode is supported


Jar2Exe Command Mode is a powerful and direct way to use Jar2Exe.

Every feature of Jar2Exe is supported at command line mode.

 At the last step of  Jar2Exe Wizard mode, you can get a equivalent command line string, so usually you need not to write the whole long command line by yourself.

Usage of J2EWIZ

You can type "j2ewiz /?" to get the tips of command line usage:

C:\>j2ewiz /?
  J2EWIZ [jarfile|classes directory] - jar filename or classes directory
         /? /h /help                 - display usage information
         /o <exefile>                - exe filename to create
         /m <main.class.name>        - startup class with main() method
         /type <console>             - application type: console
               <windows>                                 windows gui
               <service>                                 service
         /minjre <1.2|1.3 etc>       - minimum jre version required
         /maxjre <1.2|1.3 etc>       - maximum jre version required
         /platform <windows|linux>   - target platform
         /splash <picfile>           - splash picture for windows gui type
         /closeonwindow              - close splash when first window opens
         /splashtitle <title>        - specify splash title string
         /filter <wildcard>          - pattern to filter out files
         /service <name>             - service name
         /serviceshow <show name>    - service show name
         /servicedesc <service desc> - service description
         /servicedep <depended>      - other service names depended
         /hide                       - hide files
         /encrypt                    - encrypt and hide files
         /eventlog                   - system event log support
         /systray                    - system tray icon support
         /embed <jarfile>            - embed jar files depended
         /icon <iconfile>            - icon file
         /amd64                      - create 64-bit executive
         /checksum                   - enable exe self checksum
         /pv <x.x.x.x>               - product version
         /fv <x.x.x.x>               - file version
         /ve name=description        - file version description
         /config <config line>       - add a configuration line inside
         /message n=msg              - define custom error message
         /authorize                  - authorize to run as product
         /xpmanifest                 - add xp manifest

[jarfile|classes directory]

A jar file path or a directory path. If this is a directory, the directory is regarded as a classes directory. All content in it will be add to exe file except those files match the "/filter" wildcard.

/? /h /help

To display the usage tip message.

/o <exefile>

The target exe file name to be created. If this value not specified, the default value is determined from the "jar file name" by changing the extension name.

/m <main.class.name>

The entrance of your program, the main class which has "public static void main(String [] argv)" defined.

/type <console|windows|service>

Application type to generate. Default value: console.  See 3 Types of Applications for details of application type.

/minjre <1.2|1.3 etc>
/maxjre <1.2|1.3 etc>

Set the minimum and maximum java.version required respectively. Generated exe will check java.version before it runs. Default value: 1.2.   After generated, this value can be overwritten by Configuration file, see minjie page.

/platform <windows|linux>

To create exe file for Windows or Linux.

/splash <picfile>

Set the splash image for Windows GUI type on Windows.

If the "/type" is not "windows" or "/platform" is not "windows", this parameter will be ignored.

/filter <wildcard>

If it is to generate exe from a classes directory, not a jar file, this filter is to remove unused files.

/service <name>
/serviceshow <show name>
/servicedesc <service desc>
/servicedep <depended>

These 4 parameters are to set service information. They are ignored if "/platform" is Linux.


To set the class protection option.  See Class Protection page for more details about protection.


To enable Event Log function of generated exe. This value is ignored if "/platform" is Linux.  See Event Log page for more details about Event Log.


To enable System Tray function of generated exe. This value is ignored if "/platform" is Linux.  See System Tray page for more details about System Tray.

/embed <jarfile>

Add a depended jar library into exe file. This parameter "/embed" can be used more times, each time to add one jar file.

/icon <iconfile>

Add a icon file to exe file. This parameter "/icon" can be used more times. The first icon is to be the program icon. This value is ignored if "/platform" is Linux.


To create a 64 bits of generated exe. If the Jar2Exe is 32 bits edition, this parameter is ignored.


To enable generated exe self checksum. The default value is enabled, so you need to use "/checksum:false" to disable checksum explicitly.

/pv <x.x.x.x>

Set the product version. This value is ignored if "/platform" is Linux.

/fv <x.x.x.x>

Set the file version. This value is ignored if "/platform" is Linux.

/ve name=description

To set the version description. This parameter can be used more times, each time is to set a name=value pair. This value is ignored if "/platform" is Linux.

/config <config line>

To add a configuration line inside in the exe file.  See Configuration page for details.

/message n=msg

To define a customized error message.


Authorize the exe file to run as a product. The default value is true if Jar2Exe is activated. This parameter cannot be enabled if Jar2Exe is not activated.


Add XP manifest to resources of exe file, this will affect the style of Windows controls.

Add new comment