Adding a LaunchAnywhere Executable to the Install Sequence

InstallAnywhere 2020

A LaunchAnywhere executable (LAX) is a unique native executable file that InstallAnywhere creates. It is used to launch a Java application. You can add as many launchers as you would like. There are two ways to add a LaunchAnywhere launcher to an InstallAnywhere project.

To add a LaunchAnywhere executable file:

1. Perform the steps in Defining the Install Sequence. The Install view on the Sequence page opens and the OfficeSuite2000 files and folders are listed in the Visual Tree.
2. In the Visual Tree, select the User Install Folder, and click the Add Launcher button. InstallAnywhere displays a message box asking if you would like to automatically find classes with main methods.
3. Click OK. The Choose a main class dialog box opens with a class listed.

Note • When adding a launcher, InstallAnywhere automatically inspects the added files (including introspecting into JAR and ZIP files) to find class files with main methods specified.

4. Choose the com.acme.OfficeSuite as main class for the application and click OK.

Note • Since OfficeSuite is a simple project, com.acme.OfficeSuite is the only class.

By clicking the Add Launcher button, you have not only added the launcher to the file structure (OfficeSuite), but also created a Shortcut, Link, or Alias action in the Shortcuts’ Destination Folder magic folder. This location is variable and will be specified by the Choose Alias, Link, and Shortcut panel in the Pre-Install sequence.

5. To customize the appearance of the launcher’s shortcut, select the OfficeSuite launcher. The customizer in the bottom of the view changes to reflect the options for the Create LaunchAnywhere for Java Application action.

In the lower right of the customizer (below the Arguments field) are a set of buttons that control the icon that is associated with the launcher. By default, a 32x32 pixel coffee cup icon and a 16x16 pixel rocket ship icon are chosen.

6. Click the Change button. The Choose Icon dialog box opens.
7. On the Windows tab next to the 32x32 Icon, click Choose GIF File.
8. Select officeIcon.gif, which is located in the OfficeSuiteSourceFiles\Images and Docs folder within the InstallAnywhere installation directory.

Note • Interlaced GIF files cannot be used with InstallAnywhere. The conversion process does not support these files and their use can result in blank icons. For macOS or OS X, provide an ICNS file (created with iconbuilder—part of the macOS or OS X Developer Tools). InstallAnywhere maintains a general classpath that is used to create launchers for the Java Application.

9. For the 16x16 Icon, select officeIconSmall.gif from the same directory.
10. Click OK. InstallAnywhere displays the new icons in the Create LaunchAnywhere for Java Application customizer.
11. Click the Set Classpath button. InstallAnywhere displays a message box asking if you would like to automatically set the classpath.
12. Click OK. InstallAnywhere adds a blue CP icon on folders and archives that the process has added to the classpath.
13. To view the classpath as determined by the Set Classpath action: On the Project page, click JVM Settings, and then click the General Settings tab.

Note the following regarding the General Settings tab:

Since Office Suite is a simple product, only one main folder is listed: OfficeSuite2000 (which contains loose class files).
If our example project contained JAR or ZIP files containing classes, they would also have been added to this list.
If a file is added mistakenly to the Classpath List, you can remove it from within the JVM Settings view. As an alternative, you can select that file in the Visual Tree in the Install view and clear the selection of the In Classpath check box in the customizer for that file.
14. Proceed with the steps in Adding Post-Install Actions.