Build Options

After you've set all the options in the other panels, then use the Build panel to create your installers, autoupdaters, and distribute your files to the web.

If a JVM file isn't installed: If any of the installers that can include the JVM are grayed out, then follow these instructions.

JExpress performs only the functions with a check mark next to them when you click the Build button. If there are any errors during the Build, look up each error number for suggestions and work arounds. After JExpress builds your installer, learn more about testing your system and the location of your distribution files. Click on the jump point or just page down to learn more about each setting on this panel.

 


 

Version

Specify the current version number or method of distinguishing this release from previous releases. This information displays on your install program's splash screen.

 


 

Add test icons

Include a check mark if you want icons added to the desktop after you build your installers. This makes it easy to test the installer on the computer where you created it.

You also have the option of using the Test button from inside JExpress. Of course, if you want to test an installer for a different OS than the computer you're using, you'll need to move the installer to that computer.

 


 

Project Type

If you want to create installers and updaters, then select the Installers radio button. This is the default selection and allows you to define which type of installers you want for this project and whether you want JExpress to upload your installers and updater online.

If you'd like JExpress to layout your files in a directory tree, but not build an installer for those files, then select Subproject. Creating a subproject allows you to find classes for a program and then include those files in your installer project.

Subprojects are very useful when you have custom classes for JExpress. You can create a subproject that finds all the classes your custom classes use and then include the build directory of the subproject in the appropriate Custom directory.

If you simply want to jar your application, with a full manifest, then select JAR. If you create a JAR project that also finds classes automatically the JAR file's manifest will include the "Main-class" specification.

Whenever you select Subproject or Jar only you won't be able to select the type of installer or be able to upload the build directory's content online. JExpress builds the subproject and jar file locally on your system and then you can simply include the build directory in the installer project.

Be sure to build subprojects and jar only projects before you build the installer project. To learn more about building subprojects, review the tips on Multiple Related Projects

 


 

Sign files

For security, it is best if files are signed interactively.

If you have a secure environment, you can configure JExpress to automatically sign the Windows native installers, Mac native installers, cross platform installer, Java Web Start jar files, and Windows launchers created for your java apps. You must supply a command which accepts the full pathname of the file to be signed on the command line and requires no user interaction.

You'll need to create your native installers on the same platform if you'd like to sign them. In other words, if you want to sign your native Mac installers, then you need JExpress to build your installer on a Mac to use Apple's codesign program. Similarly, you'll have to build your Windows installers on Windows to use Microsoft's signtool.

Click on the Sign files button and enter a command that can run on the system where JExpress is running which signs the files. The full path to the file to be signed will be appended to the end of the command that you enter.

The commands must not need any user input. The commands should sign the files "in place". In other words, the signed file should have the same full path as the one provided to the script/batch file. You can learn more about signing EXE files from Microsoft. You can learn about signing Mac installers from Apple.

Here's an example of the contents of a batch file that would sign Windows files using Microsoft's SignTool:

    signtool sign /f SignCertFile %1

Note: SignCertFile specifies the signing certificate in a file.

There are many options so you should review Microsoft's docs to see which bet fit your situation.

Java Web Start jar files Java Web Start requires that all jar files be signed. Whatever command you enter in the "Cross platform/JWS" field be executed for each of the Java Web Start jar files.

Here's an example of the contents of a batch file that would sign a jar file:

    jarsigner -keystore mykey -storepass mypassword %1 alias

You would store this command in a script or batch file and then enter the full path to the script/batch file as the Cross platform/JWS field.

 


 

Build directory

The Build directory is where JExpress prepares your files for distribution. We recommend that this directory be a new directory so JExpress doesn't interfere with other files on your system.

JExpress defaults the Build directory to a subdirectory in your JExpress directory that matches your project's name. You can leave this field blank if you want to use the default, and JExpress will name and create the directory when you name the project.

Learn more about where JExpress stores your distribution files after it builds your installer.

 


 

Erase all of the Build directory before using

Check this box if you'd like JExpress to erase all the files in the Build directory and its subdirectories before JExpress creates a new distribution.

IMPORTANT: If you check this box, then JExpress will delete all subdirectories. On Unix, be very careful about linking to other directories to the Build directory. For example, if you'd link the root to the Build directory and then check this field, JExpress could delete all files on the drive.

IMPORTANT: Regardless if this box is checked or not, JExpress deletes the standard subdirectories created under the Build directory (e.g., installers, howto).

 


 

Installers

Add a check mark to the checkboxes that indicate which types of installers you want created for your application. JExpress can create installers that include the JVM or not. We do not usually include all the JVM files so we suggest that you follow these instructions before you try to build.

Windows:

Add a check mark next to the Windows checkbox(es) if you want to build an executable file that installs your application.

When you add a check mark to the Windows checkbox that includes the JVM, then an EXE file is created which automatically detects whether the correct JVM is on your customers' systems, installs it if it is not, and then installs your application.

If you add a check mark to the Windows checkbox with no JVM, then an EXE file is created which verifies that the correct JVM is installed on your customers' systems, but only reports to the user if it isn't. If the installer finds the correct version of the JVM, then it proceeds to install your application.

Mac:

Add a check mark next to the Mac checkbox if you want to build a Mac bundle that installs your application.

Remember if that you want to distribute Java 7 or later on Mac, then it can only be installed on OS X 10.7.3 or later. Also, the installer always installs the JRE on Mac in a subdirectory of the installation directory, called .jre.

If you add a check mark to the Mac checkboxes, then a DMG is created if you're running JExpress Builder on OS X or Linux (Linux requires genisoimage be installed in the path). Otherwise, a gzip file is created which includes the Mac application inside. Either way, your customers simply double click on the distribution file and then simply click on the icon to start the installer.

If you'd like to create a DMG installer for Mac on Windows, then you might be able to use a 3rd party commercial product. Simply create a batch file called mkdmg-on-windows.bat which invokes the 3rd party program and accepts the volume name, app bundle directory to be compressed, and the total size of the DMG in megabytes on the command line. Put the batch file in the macapp subdirectory of the JExpress directory. If JExpress cannot create a DMG when the batch file is executed during the build, then it creates a tar.gz file instead.

Linux:

Add a check mark next to the Linux checkbox(es) if you want to build a binary file that installs your application.

When you add a check mark to the Linux checkbox that includes the JVM, then a binary file is created which automatically detects whether the correct JVM is on your customers' systems, installs it if it is not, and then installs your application.

If you add a check mark to the Linux checkbox with no JVM, then a binary file is created which verifies that the correct JVM is installed on your customers' systems, but only reports to the user if it isn't. If the installer finds the correct version of the JVM, then it proceeds to install your application.

Solaris:

Add a check mark next to the Solaris checkbox(es) if you want to build an binary file that installs your application.

When you add a check mark to the Solaris checkbox that includes the JVM, then a binary file is created which automatically detects whether the correct JVM is on your customers' systems, installs it if it is not, and then installs your application.

If you add a check mark to the Solaris checkbox with no JVM, then a binary file is created which verifies that the correct JVM is installed on your customers' systems, but only reports to the user if it isn't. If the installer finds the correct version of the JVM, then it proceeds to install your application.

Cross platform:

Check this box if you want to create a Cross Platform installer. The Cross Platform installer is more compact than the native installers because it doesn't include the JVM or Swing. It also works behind firewalls by providing a single JAR file that your customers download and load. This means your customer must have the JVM already installed before they can use the pure Java installer.

Java Web Start:

Check this box if you want to create a Java Web Start installer. The Java Web Start installer requires that the user have a Java Web Start compatible browser configured. The user will have to give permission to give full access to their system for the installer to run.

You must use the Advanced interface for JExpress to create this type of installer. Use the Java Web Start sub-tab on the JVM panel to set the required JRE and the distribution URL.

All distributed jar files must be signed for the Java Web Start installer to work. You can configure JExpress to automatically sign your jar files with your key if 1) you have a key and 2) you have a script or batch file which takes the full path to the jar file on the command line and does not require any user input. Fill in the command in the Java Web Start sub-tab on the JVM panel.

Warning: Java Web Start has serious security risks and Sun appears to be abandoning it. We're not sure whether JExpress will continue to create a Java Web Start installer in the future.

 


 

Upload to web or ftp site

If you'd like JExpress to upload your distribution files to your web or ftp site, then check this box. You must have entered all the information on the Upload panel for JExpress to upload your files.

We recommend that you leave this field blank until you are successfully building your project. You might even want to test your installer offline before you add a check mark to this field to distribute it.

If you don't have any of the installer check boxes checked, and you do have this distribute box checked, then JExpress will simply verify that it's ready to build, and then upload all the files and subdirectories you have in your build directory to your ftp site.

 


 

Build

When you click this button, JExpress saves your project and then performs all the tasks you selected. If you checked Distribute, be sure your machine is connected to your web or ftp site.

If there are any errors during the Build, look up each error number for suggestions and work arounds. After JExpress builds your installer, learn more about testing your system and the location of your distribution files.