install4j and Java for Mac OS X v10.5 Update 4

Unfortunately the latest release of Java 6 on Mac OS X a few days ago broke all installers on Mac OS X that require Java 6 as a minimum Java version.

This is why we have sped up our release schedule for 4.2.3 and we pushed out the release today.

The error message you get with installers that are generated by older versions of install4j is:

Java application launched from PPC or bad stub. Relaunching in 32-bit, and tagging sub-processes to prefer 32-bit with $JAVA_ARCH=i386.
[JavaAppLauncher Error] This process is [i386] and was re-exec'd from [i386], but for some reason we are trying re-exec to [].

How could this happen? The explanation goes like this: Installers on Mac OS X ship their own binary Java application stub. Prior to Java 6 this application stub only contained 32-bit executables for PPC and Intel architectures. So far, Java 6 is only available on 64-bit Intel machines. From the beginning, the 32-bit stub continued to work with Java 6. This behavior was changed in Java for Mac OS X v10.5 Update 4, so we had to add a 64-bit executable to the Java application stub.

If you’re on an older version of install4j and cannot update to the latest version for whatever reason, you can copy the file $INSTALL4J_HOME/resource/macos/JavaApplicationStub from a 4.2.3 installation to your older installation.


    the new update also breaks applications that rely on 32 bit libraries.

    32 bit applications can however work in 32 bit mode if you pass the -d32 option with the java invocation. unfortunately i have specified this in my java invocation and it still doesn't work.

    mac applications can run in 32 bit mode if you open the "Get Info" and select the "Run in 32 bit mode" option. does install4j provide any method for setting this?


    FYI, other approaches I've found to work are to run a script which executes

    "lipo -remove x86_64

    on the new stub after installation or to specify the JVMArchs key under the Java subitem in the Info.plist file. This is deprecated by Apple but works (in some cases it's the only thing that works) at least for the time being.

    I've also found that the execute launcher action no longer works. I know that this isn't the forum for support so I've filed a bug report.



    I've tried the updater feature of install4j and the default stand alone updater returns an error "The System cannot find the path specified." to the updater error log file. I'm calling the updater from my application by "ApplicationLauncher.lauchApplication(applicationID, null, false, callback);". What can I be doing wrong, anyone with the same problem?



Post a comment