Install Engineer's Answers

How do I ship a different version of the JRE than the one shipped with JExpress?

If you want to create a distributable JVM bundle for the OS that JExpress is currently operating on (except for Mac), then start JExpress with the Advanced interface. Move to the JVM panel and click the Build JVM Bundle button.

If you want a JVM for a platform that JExpress is not currently operating, then follow these instructions.

Return to Questions

How do I make the download web pages look like my website?

JExpress creates 2 files whenever you build a new installer: index.html download.html. The index.html contains your image and details about the installers (i.e., file size, requirements, etc.).

If you prefer to use your own "look", then you can simply use a server side include and include the download.html that is in the build directory. Or, you can create your own page with frames that includes the download.html.

The templates for the web pages are in subdirectories of the webpages subdirectory. If you change any of the files in this subdirectory, the changes will be overwritten when you get an update to JExpress. Also, be careful not to change any variables or JExpress won't be able to adjust the web pages.

If you make any changes that you think all of our customers would like, then you're welcome to send the changes to us. We'll consider including them in a future version of JExpress.

Return to Questions

How do I convert a PNG file to an icon file (e.g., ico, icns)?

You can convert png files to Windows ico format using the public domain program png2ico. Apple provides a program called Icon Composer that converts jpg or png files to the Mac icns format. You'll find the program in the /Developer/Applications/Utilities subdirectory.

Return to Questions

How do I display billboards, or marquees, while the installer is running?

There is an example class in the Samples directory called StartBillboards. You can simply copy the class file to the JExpressInstaller subdirectory, add a background image file named billboard-jexpress.jpg, and a series of text files named billboard?.txt, where the ? is replaced with a numeric number starting at 1 and continuing sequentially. Each text file will be displayed in order.

The example file starts the billboards as soon as the user enters the installation directory name and clicks Next. If you would like to change the delay between panels, name of the background file, etc. when the billboards start showing, then simply modify the source to StartBillboards.

The image file should be the same width as the width of the image that usually displays. Also, you must make sure that your text files (e.g., billboard1.txt) are no wider than the image file.

The first line of the billboard text files will be centered. If you don't want a centered line, then simply leave the first line blank.

Return to Questions

How do I setup one installer for multiple programs?

You have a couple of ways that you can create an installer which installs multiple programs.

Scenario 1: You have

  • a single application which
  • contains related programs and files
  • want all the programs installed into a single directory tree structure, and
  • want a single uninstaller created which removes all programs/files

An example of this type of application is JExpress. It contains JExpress Installer and JExpress Updater, etc.. We want all the programs installed into one directory tree. But, we create multiple install subprojects so JExpress can find all the classes for each Java program. Then, we use a master project to create the installer which is distributed to our customers.

Scenario 2: You have

  • multiple unrelated programs or components
  • want the user to decide which programs to install
  • want each program installed in its own directory structure
  • want an uninstaller created for each program/component

An example might be that you want to distribute multiple products and let the end user decide which to install.

Return to Questions

How do I get my installers to have a more modern look?

Move to the Layout panel and select the look and feel. Nimbus and Synth are the 2 most popular new looks. Synth works with Java 1.5 or later while Nimbus requires a 1.6.0_10 or later.

Some look and feels allow you to change the colors by simply using the Colors button. Others, let you alter the look by setting a theme. You can even create your own theme for Synth, Nimbus, and NimROD.

Return to Questions

How do I install a JVM without searching the user's system for an existing one?

Use the Advanced interface and click on the JVM panel. Adjust the search pattern for each desired platform. To learn more about how JExpress searches, click here.

Return to Questions

How do I set the default installation directory?

You can specify the default installation directory for your application on the Install panel.

Return to Questions

How do I set the directory where the JVM is installed?

Use the Advanced interface and click on the JVM panel. Adjust the JVM install directory.

Return to Questions

How do I set the classpath on my customer's computer?

The easiest way is to let JExpress automatically set the runtime classpath. On the Install panel, set the radio button to Automatically. Of course, if you prefer to manually configure the runtime classpath, then you can do that as well. The runtime classpath should always be relative to the installation directory. You should not include absolute pathnames in the runtime classpath.

Return to Questions

How do I test the installer from my IDE?

  1. Build a cross platform installer for your project.
  2. Set the classpath to include the installer's jar file.
  3. Set the main class to com.denova.JExpress.Installer.JExpressInstaller

If you want to test custom classes that run before the license, readme, or distribution files are installed, then you can

  • set the classpath to include the JExpressInstaller directory plus the directory that contains the installer's custom classes
  • set the main class to com.denova.JExpress.Installer.JExpressInstaller
  • add the parameters -t followed by the full path to the jex project file (e.g., -t /usr/src/myproject/projects/installer.jex)
  • .

Return to Questions

How do I sign native Windows installers created by JExpress?

You'll need a certificate and a third party program (e.g. SignTool.exe) that lets you sign a file by passing the full pathname to the file on the command line and requires no user interaction.

Then, simply use the Advanced interface and enter the command to activate the third party signing program (e.g. SignTool.exe) on the Build | Run panel. Click the Sign files button to enter the command. See the manual for more details.

Return to Questions

How do I sign EXEs created by JExpress for my application's menus?

You'll need a certificate and a third party program (e.g. SignTool.exe) that lets you sign a file by passing the full pathname to the file on the command line and requires no user interaction.

Then, simply use the Advanced interface and enter the command to activate the third party signing program (e.g. SignTool.exe) on the Build | Run panel. Click the Sign files button to enter the command. See the manual for more details.

Return to Questions

How do I sign Mac OS X native installers?

You'll need a certificate from Apple and Apple's codesign program. Create a script which runs codesign with all the appropriate command line arguments. The script must be configured so the app bundle directory name is passed on the command line.

Then, simply use the Advanced interface and enter the command to activate script on the Build | Run panel. Click the Sign files button to enter the command. See the manual for more details.

You must build your Mac native installers on Mac if you'd like JExpress to automatically sign them. If you routinely create your installers on a different OS, then simply move your Mac native installers to a Mac, ungzip the installer, sign the app bundle, and re-gzip it.

Return to Questions

How do I name the Windows folder where my menus are added?

Enter the name of the folder in the Submenu field on the Menus panel. JExpress adds a folder under Start | Programs with your submenu. All menu items are added to this folder. If you don't want a folder, then leave the Submenu field blank.

Return to Questions

How do I pass extra parameters on the command line?

Simply add a -p followed by a space and then the extra parameters on the Cross Platform installer's command line. For example, if you want to pass a URL on the command line and the JRE's home directory was /bin/jre, then the command would look like this:

/bin/jre/bin/jre -cp .:[product.name-platform-version].jar com.denova.JExpress.JExpressInstaller -p http://denova.com

All parameters following -p are in the extraParameters AV property. You must write a custom panel to extract, parse, and use these parameters.

Currently JExpress only supports passing extra parameters on the command line with Cross Platform and Java Web Start installers. If you'd like the ability to support passing extra parameters with native installers, please send email to DeNova's support email account.

Return to Questions

How do I create an installer which automatically starts on the web?

Use the Advanced interface when you start JExpress. Go to the JVM panel and click the Java Web Start tab. Enter the distribution URL and set the JVM requirements. Then fill in the rest of the panels for your installer and select Java Web Start on the Build panel.

Return to Questions

How do I create a "no ask" installer?

You can create an installer which never asks the users any questions, but does show them what is going on. Simply make these changes...

  • Install panel
    • Select click free installer
  • Copy Protection panel
    • Disable
  • Custom | Installer panel
    • Do not include any custom classes which require user input.

Return to Questions

How do I run an installer or JExpress on a headless computer?

You can run JExpress and its installers, and uninstaller on a headless computer if it has a virtual framework. 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.

Return to Questions

How do I run an install a java or native app as a service or daemon?

Simply create a launcher and add a check mark to the "Install as a service" box. If you also want the service to be started after it's installed, then also add a check box to the "Start after installer" box.

The class with your main() method must also include 2 other public methods: start() and stop() which must take the appropriate actions.

Return to Questions

How do I test the installers from inside JExpress on Windows 8, 7 or 10?

  1. Download the Elevate.zip from jpassing.com
  2. Unzip the file and examine the source to insure that it meets your security standards.
  3. Either rebuild the source or just use the pre-build executables.
  4. Copy the following files from the unzipped directory to the install directory for JExpress:
    • Copy bin/x86/Release/Elevate.exe to winapp/Elevate-x32.exe
    • Copy bin/x64/Release/Elevate.exe to winapp/Elevate-x64.exe
    The filenames are case-sensitive.

The next time that you click the Test button, your installers should prompt you for admin privileges and run your installers. Some virus checkers may complain about Elevate so you might want to contact the vendor and request they remove Elevate from their grey list.

Return to Questions

How do I show a java splash screen in my app?

If you have prepared your java app to show a splash screen on startup, then it's easy to configure your JExpress project to set up a Windows menu or Mac "application bundle" to display the screen on startup of your app. Of course, you must require that the JVM is 1.6 or later.

Use the Advanced interface when you prepare your project and move to the JVM panel. Add -splash:filename as the first parameter to the JVM extra switches field. filename should be replaced with the name of the splash file that you've prepared. You should give a relative pathname from the install directory, not an absolute pathname so if a user moves the install directory everything will continue to work. For example, if your splash screen is called splash.png and this file will be installed in the subdirectory named images, then you would fill in -splash:images/splash.png to the JVM extra switches.

Important: If your installers will be used on Windows, remember to add a back slash in front of the colon (e.g., -splash\:filename). You must also include the splash file on the Files & Menus | Select panel in whichever subdirectory you reference in the -splash switch.

Return to Questions

How do I not have JExpress build both x32 and x64 native installers?

You can create or modify the custom.platform.properties file so it has properties named buildX32Installer or buildX64Installer with value of false. Remember that case is important in the names and value. Also, you don't want both properties set to false at the same time.

The custom.platform.properties file is stored in the appropriately named platforms subdirectory (e.g., for Windows, the directory is platforms/Windows). The platforms subdirectory is either in the JExpress installation directory unless you're running on Windows 10, Windows 8, Windows 7, or Windows 2008 Server in which case it's in the \Users\Public\Documents\JExpressBuilder subdirectory.

Return to Questions

How do I create an installer which auto-runs or auto-executes when the CD is inserted into a Windows computer?

Every time JExpress builds a native Windows installer, with or without the JVM, the AUTORUN.INF will be included in the build directory. When you create your CD, make sure the Windows installer and AUTORUN.INF files are copied to the CD's root directory.

Return to Questions

How do I configure JExpress so it retains the files original time stamp on the target computer?

There is a custom class, named SetLastModifiedDate, included in the Samples subdirectory which you simply need to include in your installer. Use the Advanced interface and add the class to the Custom | Installer panel in the "After Welcome" field.

If you have other custom classes, then copy the SetLastModifiedDate.class to the directory that you specified in Class files located field in the Custom | Installer panel. If this is the only custom class, then you can simply fill in Samples to the Class files located field.

Return to Questions

How do I configure Mac's About box?

Mac's "About" menu needs a special handler from Apple added to your application. Here are a few references that should help:

Return to Questions