Unattended Builds

After you create your installer/updater project, you can let JExpress build it from the command line. Simply pass the full pathname to your project. Earlier versions of JExpress required that you include the .jex in the project. More modern versions want the full path to the directory where the options.jex and platforms subdirectory are. Important: Make sure that the working directory or initial directory is set to the JExpress directory if you are using a batch file or make tool, like Ant or Maven.

For example, if you want to build the sample HelloWorld project, you'd add HelloWorld to the command that launches the JRE and passes com.denova.JExpress.Builder.JExpressAdvanced as the classname. If the project directory is not in the JExpress directory, then you must include the full pathname for the project.

The following return codes are used to indicate the status of the build (Windows users see note below):

Status of Build Return Value
Successful 0
Unsuccessful -1
Successful with warnings -2

Review the log files, especially errors.log, to see details about any errors that occurred during the build.

An unattended build does not display the Advanced user interface while it's building, but you must still have a GUI system interface installed to use JExpress. You can run JExpress on a headless machine if it has a virtual framebuffer. There's an example of a unix script in the "config" subdirectory of your JExpress installation directory called run.jexpress.headless that you can adapt to your environment.

Ant

There are 2 example build projects in the Samples directory to show you how easy it is to integrate JExpress into an ant project.

Command Line Arguments

Example:
java -cp . com.denova.JExpress.Builder.JExpressAdvanced <project> [options...]

You have to run unattended builds from the JExpress application directory (where you installed JExpress), so the classpath must be ".:icons".

The project filename is required. Use a pathname relative to the JExpress application directory, or a fully qualified pathname. Replace <project> with the pathname to your project.

There are a few optional parameters that you can append to the command line after the project's name for an unattended build with JExpress. These parameters are not available when you operate JExpress interactively.

You can combine any or all of these command line arguments in any order after the full pathname to the project.

Version #

Add the -version switch after the JExpress project name, followed by the version number for the build. For example, if the project name is Hello and the version number is 1.5, then the command line would look like this:

java -cp . com.denova.JExpress.Builder.JExpressAdvanced Hello -version 1.5

Base Directory

Add the -basedir switch after the JExpress project name, followed by the full directory name for the project's base directory. If there are any spaces in the directory name, then you must include the directory name in double quotes. For example, if the project name is Hello and the base directory is /usr/src, then the command line would look like this:

java -cp . com.denova.JExpress.Builder.JExpressAdvanced Hello -basedir /usr/src

Build Directory

Add the -builddir or -buildir switch after the JExpress project name, followed by the full directory name where you want the installer's to be stored/built. If there are any spaces in the directory name, then you must include the directory name in double quotes.

For example, if the project name is Hello and the build directory is /usr/dist, then the command line would look like this:

java -cp . com.denova.JExpress.Builder.JExpressAdvanced Hello -buildir /usr/dist

Important for Windows Users: You can not start JExpress from the menu or the JExpress.exe if you want to see the status codes from an unattended build. You must launch JExpress directly from the command line with the full java command (e.g., java -cp . com.denova.JExpress.Builder.JExpressAdvanced) to see the return codes.