After you create your installer/updater project, you can let JExpress build it from the command line. Simply pass the full pathname, including the .jex, of the project you want to build. 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.
For example, if you want to build the sample HelloWorld project, you'd add HelloWorld.jex to the command that launches the JRE and passes com.denova.JExpress.Build.JExpressAdvanced as the classname. If the project filename 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 on the system running JExpress because Sun's Swing requires it. In other words, if your machine is headless it must still include a GUI (e.g., X-Windows for unix) for JExpress to be able to run.
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
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>.jex 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.jex and the version number is 1.4, then the command line would look like this:
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.jex and the base directory is /usr/src, then the command line would look like this:
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.jex and the build directory is /usr/dist, then the command line would look like this:
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.Build.JExpressAdvanced) to see the return codes.
Copyright © 1997-2008 DeNova. All rights reserved worldwide.
Privacy policy
Legal notices