View Full Version : Can't install Mac Launcher

Marc B.
07-23-2004, 03:35 PM
I'm trying to add a Mac Launcher as part of my installation, but I get the following error log file when I run it on Mac OS:

(Jul 23, 2004 4:10:21 PM), Install, com.installshield.wizard.platform.macosx.extras.MacOSXAppLauncher, err, An error occurred and product installation failed. Look at the log file /Applications/digAnimator/log.txt for details.
(Jul 23, 2004 4:10:21 PM), Install, com.installshield.wizard.platform.macosx.extras.MacOSXAppLauncher, err, ProductException: (error code = 601; message="Missing MRJProperties file while configuring MACOSX App Launcher")
ProductException: (error code = 601; message="Missing MRJProperties file while configuring MACOSX App Launcher")
at com.installshield.wizard.platform.macosx.extras.MacOSXAppLauncher.install(Unknown Source)
at com.installshield.product.service.product.PureJavaProductServiceImpl.installProductAction(Unknown Source)
at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.getResultForProductAction(Unknown Source)
at com.installshield.product.service.product.InstallableObjectVisitor.visitComponent(Unknown Source)
at com.installshield.product.service.product.InstallableObjectVisitor.visitInstallableComponents(Unknown Source)
at com.installshield.product.service.product.InstallableObjectVisitor.visitProductBeans(Unknown Source)
at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.install(Unknown Source)
at com.installshield.product.service.product.PureJavaProductServiceImpl$Installer.execute(Unknown Source)
at com.installshield.wizard.service.AsynchronousOperation.run(Unknown Source)
at java.lang.Thread.run(Thread.java:552)

I added a "Launcher (Mac OS X)" action to a component which installs itself only under the Mac platform.

Can anyone help on this?

07-28-2004, 12:44 PM
As it turns out, this is a known issue with the launcher bean on the Mac. This was recently discovered, so development has not yet had the chance to fix the issue.

This problem is due to the fact that the class path for the main class was not added to the Info.plist or the MRJApp.properties file in the app bundle and this is the reason the app bundle is not launching your application. To work around this, you can manually modify the MRJApp.properties file to include the classpath using the ascii file udpate bean.

Attached is a sample project which demonstrates the work around. In particular, look at the ascii file update bean which has been added to the component.

Note: to build the project, you need to copy notepad.exe into the ISX universal home directory. On windows, this is typically "C:\Program Files\InstallShield X\Universal Installer"

Marc B.
07-29-2004, 09:53 AM
I managed to build your project, but when I run the installer on a Mac, as soon as I click the "next" button on the first screen, the error below appears on the console. The installer actually stays on the same welcome screen forever.

I basically unzipped your notepad.zip file on my desktop, opened the project, edited the "files" action to specifically include the notepad.jar file, and built it.

java.lang.ClassNotFoundException: com.installshield.notepadjar_mac_launcher.event.dialog.swing.FrameBegin
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at com.installshield.event.ActionSequenceEngine$ActionTask.invokeJavaMethod(Unknown Source)
at com.installshield.event.ActionSequenceEngine$ActionTask.executeAction(Unknown Source)
at com.installshield.event.ActionSequenceEngine$ActionTask.run(Unknown Source)
at com.installshield.event.ThreadPool.run(Unknown Source)
at java.lang.Thread.run(Thread.java:552)

I tried your workaround on my own project. It seems to avoid the installation error (the installation completes successfully), but there is no app launcher.

Also, you included a standard launcher and shortcut in your notepad project. Are these required for the mac launcher to work?


07-29-2004, 10:45 AM
Sorry, the project needed to have a the event code source location property changed so that it would know where to find the CustomCode folder. Try the new attachement "NewProject.zip" instead.

Marc B.
08-02-2004, 09:59 AM
Thanks for the sample project. I finally got a Mac App launcher working, but I still have a few issues/questions:

- the app launche is installed in /Applications/ folder directly. Is it possible to change that directory. For example, could the bundle be installed directly in the application's install directory, as specified by the user?

- When starting the application from the launcher, the working directory is /Applications/. Is it possible to change that working directory to the application's install directory?

Also, using a normal launcher + shortcut doesnt seem to work on Mac. Anytime I execute the myapp.command file to start the app, I get an UnsupportedClassVersionError (see attached file). Any ideas why?

Thanks a bunch!

08-02-2004, 11:41 AM
At this time, ISX does not provide the ability to change the location where the app bundle willl be created; however, as an app bundle is nothing more than a directory, you should be able to use the copy directory bean to make a copy of the app bundle in a new location.
I'm not certain how you might set the working directory for the app bundle. I could not find any information on setting the working directory for an app bundle on the web. You might need to use the "normal" launcher for this.

I could not reproduce the issue that you are seeing with the "normal" launcher/shortcut. From the exception which was thrown, I can only assume that the JVM being used does not support the class files in your application. As you are seeing a java exception, the launcher is doing it's job. Otherwise, you would not see a java exception. See attachment for the sample project which I used to create a normal launcher/shortcut.

Marc B.
08-04-2004, 10:41 AM
Regarding the UnsupportedClassVersionError, note that my application runs correctly on Mac if I launch it with the mac launcher (.app bundle) or directly with the jar file. From posts on the net I believe this error indicates that an older JVM is trying to run an app compiled using a more recent JVM.

Could it be that the normal launcher on mac doesnt use the correct or latest JVM?


08-04-2004, 11:37 AM
The Mac launcher could potentially be using a different JVM than the "normal" launcher. Try this: under "additional tools->JVM resolution" view, and set "JVM platform" to "Mac OS X Launcher distribution". Remove all search instructions except for 1.4.x by apple computer.

In addition, go to "application->launchers" view and select the "advanced" tab. Click on "product uninstaller JVM resolution", and look for "Mac OS X platform properties". Under "JVM search instructions", be sure that you have only included the "1.4.x by apple computer" search instruction.

Doing this should force the launcher to use 1.4. To verify that this is the case, run the launcher with the following command line:

<launcher name>.command -is:log logfile.txt

This will create a log file in the current working directory which shows the command line used to launch the java application.

02-18-2005, 02:30 PM
hi, I got charlesw example to work, but it is only with setup.jar file, and it is with a terminal window opened, is there anyway to get rid of that?

and do you know why the .app bundle file work? I tried to double-clicked them but nothing is happening, it opened and closed so quickly. and I can't make the .command to work also.

Is it intended to work only with setup.jar for mac os x?