Get Started

Download

UI Tool

Screenshot

Options

Select App Folder

The folder of the application, which would be copied to the output folder.

Protector4J App

Please check this value if the app is a Protector4J App. Learn more about Protector4J App, please visit https://protector4j.com.

Select Bundled JRE

The Java runtime needs to be bundled into the application. If this field is empty, the application will use the system java runtime, but it needs to make sure that the java version selected below is the same with the java version of the system.

Launch Mode

MainJar

MainJar mode is exactly like launching the app by java -jar xxx.jar. You can specify the main jar file in the “Main Jar” field, and the path is relative to the application folder, for example, the main jar in the application folder is swingapp.jar, just input swingapp.jar here.

MainClass

MainClass mode is the way that launches the application by java -cp classpath.jar MainClassName
In MainClass mode, you need to specify the classpath and the main class. The path of the classpath is relative to the application folder too.

JVM Options

You can input the JVM options here, just like the -Xms, -Xmx, and other parameters.

Java Version

The Java version selected here needs to be the same with the java version of bundled JRE, or the same as the java version of the system.

Target Platform

The target platform of the executable wrapper

Executable Name

The filename of the executable wrapper

App Folder as Output Folder

If you need to create the executable wrapper in the app folder, and not copy the app folder to the output folder, please check this value.

Output Folder

The output folder, the app folder, and the executable wrapper will be copied into the output folder after the executable wrapper is created.

Splash

The splash image when the app launching, only supports gif now.

Singe Instance

Single instance feature, only supports Windows now.

Hide Console

Hide console window, only supports Windows now.

Windows executable information

Some Windows executable information, just like the icon, file version, file description and others.

Create the wrapper

create the Start button on the toolbar to create the wrapper, you can see the result in the output folder or app folder after task done.

CLI Tool

The configuration file

First, we need a configuration file to pass the information to create the wrapper, there is a config-template.yml in the wrapper4j’s folder, the contents are below:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
appFolder: ''
protector4JApp: false
jreFolder: ''
# Launch mode, main-jar or main-class
mode: ''
# the relative path of main jar
mainJar: ''
mainClass: ''
# relative path to the app folder, for example, classpath: [xx1.jar, xx2.jar]
classpath: []
# jvmOptions, for example, jvmOptions: [-Xms128M, -Xmx512m]
jvmOptions: []
# java-8 or java-11
javaVersion: ''
# Available values: win64, linux64, mac, win32, linux32
targetPlatform: ''
# Executable name
exeFileName: ''
appFolderAsOutputFolder: false
outputFolder: ''
singleInstance: false
hideConsole: false

# Windows executable information
icon: ''
productName: ''
fileVersion: ''
fileDescription: ''
productVersion: ''
companyName: ''
legalCopyright: ''

You can find explanations of these items here

Create the wrapper

Go to the folder of wrapper4j, then execute the command below:

1
wrapper4j [path-of-config-file]