Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

Tools of the trade, Part 3

Install your Java programs with InstallAnywhere

  • Print
  • Feedback

Page 6 of 6

  1. Select the Info tab from the Project tab
  2. Type Graphical Lines Application in the Installer Title text field
  3. Type GLA in the Installer Name text field
  4. Select the Look & Feel tab from the Project tab
  5. Click the Choose button in the Startup Splash Screen Image section
  6. Select Lines.gif as the splash screen image file
  7. Select the Install tab
  8. Click the Add Files button and choose the four classfiles: Context.class, Lines.class, Lines.class, and Stub.class
  9. Click the Add Launcher button so it can find the main classfile
  10. Select the Build tab
  11. Check Windows Without VM checkbox
  12. Click the Build Project button
  13. Assuming a successful build, click the Try Installer button to start the installer


If the build process succeeds, you should see the custom splash screen after clicking Try Installer. Figure 7 shows what that screen looks like.

Figure 7. The custom splash screen appears when the installer runs

A splash screen is just a taste of what you can accomplish with the Advanced Designer. License agreements, billboard ads, and the use of rules to customize installation are among additional possibilities. This article's study guide challenges you to add a license agreement and a billboard ad to the GLA.EXE installer.

Caution
My Windows-based evaluation copy of InstallAnywhere 5 Standard Edition presented me with three problems:

  • My project folder did not always appear where I wanted it to appear: When I typed c:\Lines in the Save New Project As dialog box's Path text field, and the Folder dropdown list displayed any folder apart from the root folder, InstallAnywhere would not create my folder under the root folder. Instead, InstallAnywhere created that folder under the folder identified by the Folder dropdown list. I solved that problem by continuing to click the Up One Folder icon until I reached the root folder.
  • Advanced Designer uses the installer title and not the installer folder name: I consistently observed Graphical Lines Application instead of Lines as the installer folder name.
  • InstallAnywhere occasionally stopped responding: From time to time, my evaluation copy of InstallAnywhere 5 Standard Edition stopped responding (as evidenced in Windows task manager). I was forced to terminate the not-responding copy and start a fresh copy.


You too might encounter these problems. (In fairness to Zero G, the problems might be related to my Windows platform.)



Review

Sun Microsystems' lack of an installation tool in the J2SE SDK has led vendors to create their own installation tools. InstallAnywhere is one example. Use that tool to create installers that install both Java and non-Java applications on various platforms.

InstallAnywhere's user guide presents various core concepts that you should understand before using that tool. Once you understand those concepts, use Project Wizard to quickly build simple installers. To build more sophisticated installers that support splash screens, license agreements, advertising billboards, and more, use Advanced Designer. Each operation mode lets you easily switch to the other mode.

For brevity, this article does not discuss many concepts, including InstallAnywhere's API. Obtain an evaluation copy and explore the user guide. You should have no trouble learning those concepts on your own. In spite of the three problems I encountered with InstallAnywhere (see the Caution), I found this tool incredibly useful and recommend you obtain your own registered copy of the Standard Edition for your toolkit.

I encourage you to email me with any questions you might have involving either this or any previous article's material. (Please keep such questions relevant to material discussed in this column's articles.) Your questions and my answers will appear in the relevant study guides.

This article referred to regular expressions, a topic I will explore next month.

About the author

Jeff Friesen has been involved with computers for the past 20 years. He holds a degree in computer science and has worked with many computer languages. Jeff has also taught introductory Java programming at the college level. In addition to writing for JavaWorld, he has written his own Java book for beginners? Java 2 by Example, Second Edition (Que Publishing, 2001; ISBN: 0789725932)?and helped write Using Java 2 Platform, Special Edition (Que Publishing, 2001; ISBN: 0789724685). Jeff goes by the nickname Java Jeff (or JavaJeff). To see what he's working on, check out his Website at http://www.javajeff.com.

Read more about Tools & Methods in JavaWorld's Tools & Methods section.

  • Print
  • Feedback

Resources