Mac OS X v10.5: Some Java applications may not work as expected with Java for Mac OS X 10.5 Update 4
Products Affected
Java, Mac OS X 10.5
Symptoms
After installing Java for Mac OS X 10.5 Update 4, certain Java applications may not open or work as expected. This can occur when a Java application is unable to run in 64-bit mode.
Resolution
With Java for Mac OS X 10.5 Update 4, a new Java app launching policy was introduced to bring it in line with standard Cocoa applications. If a Java application cannot run in 64-bit mode, one of the three following solutions can be used to open the application in 32-bit mode:
Solution 1: Change the setting in the Finder (recommended)
- Select the application's icon in the Finder
- Control-click (right-click) the application's icon and choose Get Info.
- Ensure that "Run in 32-bit mode" is enabled. Repeat this step on each Mac that will run the application.
Solution 2: Set the LSArchitecturePriority key (advanced)
Note: Choose this solution if you still want to support 64-bit. If you only need to support 32-bit, proceed to Solution 3.
You can use this advanced solution if you are comfortable editing plist files.
Edit the application's info.plist file, and set only the architectures that the application can run on. The strings defining the architectures in the array can be re-ordered to suit the needs of the application bundle. For example, the following array gives the 32-bit i386 architecture priority over the 64-bit x86_64 architecture. To remove 64-bit compatibility from the following array, the entry for x86_64 (in red) can be deleted.
<key>LSArchitecturePriority</key>
<array>
<string>i386</string>
<string>x86_64</string>
<string>ppc</string>
</array>
Solution 3: Remove the x86_64 slice (advanced)
You can use this advanced solution if you are comfortable using the command line in the Terminal application.
Mac OS X contains a command line utility, lipo, that can be used to remove architecture slices which are not needed. The following Terminal commands will remove the x86_64 slice from an application executable. A copy of the original executable will be saved with "_64" appended to the filename.
Important: lipo alters application bundle executables. Create a backup copy of the application bundle prior to making any changes.
- Open Terminal (located in /Applications/Utilities).
- Change directory into the Contents/MacOS folder of the application bundle.
- Execute these three commands, in order, replacing appname with the name of the Java application executable in the Contents/MacOS folder:
lipo -remove x86_64 -output appname_32 appname mv appname appname_64 mv appname_32 appname
The resulting "appname" executable will no longer contain a 64-bit slice; the application bundle will only launch in 32-bit.
Twitter
Facebook