File Options

The Files panel lets specify all the files you want included with your installer. If you're finding classes automatically, then do not include the class files that JExpress finds automatically in this panel.

When you select a directory, then you can quickly specify whether you want to include all files in the directory and its subdirectories, or limit the files by extension.

Important: If you are having trouble selecting a network drive, then click here.

You can follow step-by-step instructions about the various ways you can select and specify files and directories. Click on the jump point or just page down to learn more about each setting on this panel.

 


 

File list

Add all the files and directories that are part of your application which includes, but is not limited to, class, JAR, ZIP, images, and text files. If you configured JExpress to Automatically find classes, then you do not want to include any of the class files in the list, except those that are loaded with the Class or ClassLoader classes (i.e., Class.forName, ClassLoader.loadClass).

Important Note: If you can't select a network drive, then you will need to modify the start up command for JExpress.

There's no need to prepare your distributable files into a single directory tree because you can select individual files or entire directories from multiple directories. If you select a directory in your list, then JExpress can automatically include all of its files and its subdirectories. You can also include or exclude files within the selected directory and its subdirectories by extensions. Simply enter the file types, without the period, in the Extensions field and click the radio button that specifies whether to include or exclude files matching the masks. If you want multiple extensions, then use a space as a separator.

 


 

Adding Files and Directories

Whenever you select a directory, then you can specify how you'd like the files from that directory, and its subdirectories to be included. To illustrate how these options vary, lets assume that the installation directory is called /NewApplication and that you've selected a directory on your system called /Example/Manual which contains the subdirectories Chapter1 and Chapter2.

As a directory: Creates a directory by the same name in the target machine's installation directory. It also maintains the subdirectory tree on the target machine. In our example, this means that the user's installation directory, called /NewApplication, would contain a subdirectory called Manual, with its associated files, and that the Manual subdirectory would contain the subdirectories Chapter1 and Chapter2 with their associated files.

Files and subdirectories: Stores the files from the selected directory in the user's installation directory and maintains the subdirectory tree on the target machine. In our example, this means that all the files in your /Example/Manual directory would be stored in the user's /NewApplication installation directory. Plus, the subdirectories Chapter1 and Chapter2, with their associated files, would be created in the user's /NewApplication installation directory.

Files only: Stores all the files from the selected directory, and its subdirectories, in the user's installation directory. In other words, the original directory tree is not maintained. In our example, this means that all the files in /Example/Manual, /Example/Manual/Chapter1, and /Example/Manual/Chapter2 are stored in the customer's /NewApplication directory. No subdirectories are created with this option.

 

Advanced options If you're building an installer for multiple platforms, then you'll probably want to be sure to specify the files in your project that are text files so JExpress can automatically convert the line endings to the local system.

Also, JExpress makes it easy to create a project on one machine and then move that project to another machine and run it, even if that new machine is operating on a different OS or has a different file structure. Both machines must use the same basic directory structure for your project files, but the directory tree may differ from the base.

Please remember that if JExpress is operated from multiple machines, you may need to purchase multiple licenses. This means that if you design the installers, but someone else or another department runs JExpress to create the installers for distribution, then you need at least 2 licenses to JExpress. See the license or send e-mail to if you have any questions about licensing.

 

Text file extensions

If you are creating a cross platform installer, then you need to specify the extensions for all of your text files. Separate the extensions with a single space and do not include a period before the extension. It's important that none of your non-text files use the same extension as the text files you specify here.

During the installation, any files with a matching extension are automatically converted to the target system's end of line character. For example, if you created your files under Windows and you specify txt as a text file extension, then your JExpress installer automatically changes carriage return/line feeds into line feeds for all txt files if the target system's OS is Unix.

 

Base Directory

If you want to be able to use your project on different machines and you have organized all of the files in your project so that all files are within the same directory tree, then you can use the base directory option to make the transition easy. When you move to a new machine you simply change the Base directory to fit your new directory structure before you build your project. Whenever the base directory exists, then all files in the Files panel, the license, readme, and image files are saved relative to the base directory, if those filenames are located within the base directory tree.

The base directory is similar to "ant's" basedir.

Let's assume you have 3 machines that are licensed to operate JExpress. By setting the Base directory to C:\Projects\MyProject you can make it easy to move your project between environments.

Machine Project Files Base Directory
A
  • C:\Dev\MyProject\readme.txt
  • C:\Dev\MyProject\license.txt
  • C:\Dev\MyProject\myproject.gif
  • C:\Dev\MyProject\com\company\app\myapp.class
  • C:\Dev\MyProject\com\company\app\other.class
C:\Dev\MyProject\
B
  • G:\Projects\Wizard\readme.txt
  • G:\Projects\Wizard\license.txt
  • G:\Projects\Wizard\myproject.gif
  • G:\Projects\Wizard\com\company\app\myapp.class
  • G:\Projects\Wizard\com\company\app\other.class
G:\Projects\Wizard
C
  • /usr/wizard/dev/myproject/readme.txt
  • /usr/wizard/dev/myproject/license.txt
  • /usr/wizard/dev/myproject/myproject.gif
  • /usr/wizard/dev/myproject/com/company/app/myapp.class
  • /usr/wizard/dev/myproject/com/company/app/other.class
/usr/wizard/dev/myproject

Notice that all 3 environments use the same file layout below a certain point in the directory tree. You want your Base directory set to the unique part of the directory tree.

Important: The base directory must be an exact match, so we strongly recommend that you use the Browse button to select the directory name. Also, remember that when you select the directory in the browse dialog box, the directory name must appear in the "File name" field because of a quirk in Swing.

 

Selecting a Network Drive

If you are having trouble selecting a network drive when you click the Add button on the Files panel, then you probably need to adjust the way JExpress starts. Follow the instructions for your environment below.

Windows with JRE 1.4.x or later

Exit JExpress and load the JExpress.properties file (located in the JExpress subdirectory of your JExpress install directory) into a text editor. Change the property for the args attribute so you prepend the following information (following the =):

-Xbootclasspath/p:.

For example, if the args line looked like this before you made any changes:

args=-cp . com.denova.JExpress.Build.JExpress

then the line should look like this after your changes:

args=-Xbootclasspath/p:. -cp . com.denova.JExpress.Build.JExpress

Save the changes and start JExpress again. You should be able to select network drives from the drop down menu.

Unix Systems with JRE 1.4.x or later

Load the jexpress script into a standard text editor and add the following switch before the -cp switch:

-Xbootclasspath/p:.

Save the file and restart JExpress.

Any OS with JRE 1.4.x

If you're running JExpress version 4.1.0 or earlier, then you'll need to get an update to the latest version. DeNova's development team fixed a bug in Sun's Swing code that prevented Swing from letting users on Windows select network drives. The latest version of JExpress includes this change. DeNova has supplied the changes to the code to Sun's development team and we hope they'll release a new version of Swing that includes the fix.