With the JRE bundle wizard you can create JRE bundles for install4j from any JRE installation
on your disk. For more information on JRE bundles and on how they are used by install4j, please see the
corresponding help topic.
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.
The JRE bundle wizard is started by choosing Project->Create a JRE Bundle
from install4j's main menu.
The JRE bundle wizard leads you step by step
through the process of choosing the desired JRE and creating an install4j bundle from it:
To automate the JRE bundle creation, you can use the command line utility
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:
Creating a JRE bundle from your ant script (read about ant at
ant.apache.org) is easy.
Just use the 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:
<createbundle javahome="/usr/lib/jvm/jre-9.0.4/jre" output="/home/build/projects/myproject/jrebundles" version="9.0" id="j3d" />