Please check first, if one of the JREs provided by ej-technologies' JRE download server fits your needs.
Note that JRE bundles can only be created on the platform where they are intended to run. For example, it is not possible to create a Linux JRE bundle on Windows. You have to install install4j on a Linux machine and run the JRE bundle creation process there.
jres
directory in your
install4j installation directory. If that directory is not writable, the
.install4j7/jres
directory in your home directory is used. Bundles in the default directory
will be suggested by the IDE.
You can also save your bundle to any other directory and use the Manual entry option in the Bundled JRE step of the media wizard to select the bundle file.
9.0
.
The version and the custom ID are used to construct the name of the bundle file. The format of the name is important for the IDE to recognize the file as a bundle and determine its scope.
createbundle[.exe]
in the bin
directory of your install4j installation.
The bundle creation tool is invoked as follows:
createbundle [OPTIONS] [JRE home directory]
The available options are:
createbundle
task
that is provided in $INSTALL4J_HOME/bin/ant.jar
and set the javahome
parameter to the JRE that you want to create
a bundle for.
To make the createbundle
task available to ant, you
must first insert a taskdef
element that tells
ant where to find the task definition. Here is an example of using the
task in an ant build file:
<taskdef name="createbundle" classname="com.install4j.CreateBundleTask" classpath="C:\Program Files\install4j\bin\ant.jar"/> <target name="media"> <createbundle javahome="c:\Program Files\Java\jre6"/> </target>
The taskdef
definition must occur only once per
ant-build file and can appear anywhere on the top level below the
project
element.
Note: it is not possible to copy the ant.jar
archive to
the lib
folder of your ant distribution. You have to reference a full
installation of install4j in the task definition.
The createbundle
task supports the following parameters:
Attribute | Description | Required |
---|---|---|
javahome | The home directory of the JRE that should be bundled | Yes |
outputDirectory | The output directory |
Corresponds to the --output
command line option described above.
|
version |
Corresponds to the --version
command line option described above.
| No |
id |
Corresponds to the --id
command line option described above.
| No |
unpacked |
Corresponds to the --unpacked
command line option described above.
| No |
Example:
<createbundle javahome="/usr/lib/jvm/jre-9.0.4/jre" output="/home/build/projects/myproject/jrebundles" version="9.0" id="j3d" />