JExpress includes several custom examples. You're welcome to use these examples as is or modify them to meet your needs. DeNova retains the copyright on all examples.
There is a Samples subdirectory in your JExpress directory which contains both .java and .class files. These classes are designed to show how to create a custom class and access some of the API's calls. While we try to keep the classes up-to-date, you may need to adapt the source to handle changes in environments, etc. Once the class does what you want, simply copy the .class file to the JExpressInstaller subdirectory and add the classname to the Custom options in JExpress Advanced.
If you modify any of the examples, then add the full path to the JExpressInstaller subdirectory to your compiler's classpath. You do not want to add the installation directory for JExpress itself as you do not have a license to distribute any of the classes outside the JExpressInstaller subdirectory tree.
Please be sure to review the Java source code for important notes about each class. Some of the classes require that you modify the code to meet your needs. Also, the source tells you where you should include the class file in the Custom panel.
Here's a quick overview of the examples provided with JExpress.
| Classname | Description | Java source |
| Ant build.xml | Examples of Ant's build file. |
build.xml
build-custom.xml |
| StartBillboards |
A panel that starts series of billboards, or marquees, to display
in place of the installer's icon. The billboards can start at
anytime during the installation, but this example starts them as
soon as the user enters the installation directory.
You simply need to define a series of text files for the billboards and a background image. See the source code for details. |
.java |
| RegisterPanel |
A panel that lets users input the name, company, e-mail address,
and serial number. It formats the panel so it looks like the
standard wizard panels in a JExpress installer. A text file, called
regform.txt, is saved in the installation directory with the
results.
You should only use this class After selecting the install dir or later because it needs the name of the installation directory. If you use it at any other time during the installation, then nothing will happen. |
.java |
| SendFeedback | You can prompt your user to send feedback before they uninstall your application. Follow the instructions in the README for details about how to do this. | README |
| ExampleWizardPanel | A simple example of displaying text in the install wizard, changing the name of the Next button, and waiting for the user to click a button on the wizard. | .java |
| ExampleCommand | This panel is only the framework that shows you how to create a separate thread. You only need to create a separate thread if your class will take time to execute. If you are writing a simple panel that interacts with the user, then you probably don't need to use this method. | .java |
| DecisionTree |
A panel that shows you how to change which panels are active and
inactive during the installation.
You'll also need to look at the sample classes: Branch1, Branch2, and Branch3 to fully understand how fully you can control your installer with a few simple commands. |
.java |
| MakeInstallerSilent | If you'd like users to have a silent install, but you don't want to require them to pass any commands on the command line, then you can adapt this class. You'll need to specify what directory to install the app and any other data that your custom classes may need. | .java |
| AuthenticateUpdatePanel |
A panel that lets users input a user id and password so the Updater
can access the web server. The data entered is saved in the
update.control file.
You should only use this class in After the install because it needs the name of the installation directory. If you use it at any other time during the installation, then nothing will happen. |
.java |
| SkipUpdate | Skip the rest of the update after the files are compared. | .java |
| RedirectUpdater | Change the URL where updates are downloaded before the Updater starts. | .java |
| WinUninsallMenu |
Creates a menu item to uninstall your product. Of course, the user
can also uninstall your product from the Add/Remove option in the
Control Panel if running on Windows or the uninstall script if
running on Unix.
You should only use this class in After the install because it needs the regular uninstaller created before it can add this special menu item. |
.java |
| WinFreeDiskSpace | Reports the amount of free disk space on a Windows drive. Must be adapted to meet your needs. | .java |
| WinRegistry | An example that shows how to modify the registry. Must be adapted to meet your needs. An alternative is to use the sample WinImportRegFile class or the methods in the WindowsOS class.. | .java |
| WinImportRegFile | An example that shows how to import a .reg file into the registry. Must create an install.reg file and the target machine must have Regedit.exe or Regedit32.exe in the Windows or WinNT directory. An alternative way to manage the Windows registry is with the sample WinRegistry class or the methods in the WindowsOS class. | .java |
| AutoStartMenu | Autostart a menu item on Windows, Mac, and KDE. | .java |
| MoveFiles | Move all DLL files from the installation directory to the Windows\System directory. Can be easily adapted to move other files, as needed. | .java |
| DeleteMenuItemsPanel | Deletes specific menu items. Useful if you only want certain menus created depending on the user's install type. Must be adapted to meet your needs. | .java |
| RunThirdPartyProgram | By creating a class that calls RunThirdPartyProgram, you can run a third party program during the installation. Be sure to include the third party program, the RunThirdPartyProgram.class, and your custom class files in the JExpressInstaller subdirectory. | .java |
| MoveToPanel |
These 2 panels demonstrate how to easily move between panels. To
move to a panel out of the standard sequence during an
installation, you must name the panel. You use the showPanel()
method, passing the destination panel's name, to move to it.
If you add the MoveTo1Panel classname to After readme and the MoveTo2Panel classname to After install, you'll be able to see how easy it is to vary the panels that show up during an installation. |
1.java
2.java |
| VersionPanel |
Creates a text file, called version.txt, in the installation
directory with the product's name, version, and copyright. You
could use this text file when you're displaying your About box so
you only change the version number of the product in the installer.
This example requires no user input.
You should only use this class in After the install because it needs the name of the installation directory. If you use it at any other time during the installation, then nothing will happen. |
.java |
| StartApplet | This class contains a main() which launches a web browser and passes a URL on the command line. Read the notes in the StartApplet.java file to see how you can use this class with the GetBrowser sample class to create a menu item or launch script to start your applet. | .java |
| ChangeBackground | Change the background color of the installer. | .java |
The most up-to-date examples are on our web site.
You can use the step-by-step
instructions to design your custom commands. If you have any questions
about customization, please email Technical Support at
Copyright © 1997-2008 DeNova. All rights reserved worldwide.
Privacy policy
Legal notices