If you have a bunch of old Java applications lying around in your Mac’s /Applications folder, chances are, you’ll come across this message box when you attempt to run them on Snow Leopard:
To open JavaApplicationStub, you need to install Rosetta. Would you like to install it now?
Personally, I try my best to avoid legacy Mac OS apps and haven’t found the need to install Rosetta on OS X 10.6 Snow Leopard as of yet. Whether you have need of Rosetta for your other applications or not, there’s no reason you should be running your Java-based applications through the Rosetta environment — they’ll run just fine on native Intel Java on OS X… with just a little bit of a prod in the right direction.
Java applications are CPU agnostic (hence the “write once, run everywhere” Java motto). The Java applets you download and use can theoretically be run on any
PC machine that supports Java; be it Intel, PPC, ARM, SPARC, or more. The native Java virtual machine will translate the “Java bytecode” into the equivalent machine assembly that your PC uses and understands, and therefore, Java code written for legacy Mac OS should run just fine on Snow Leopard
If there’s no problem with running older Java applications on Snow Leopard, why am I seeing this dialog? you ask. Well, the problem isn’t with the Java application itself, rather it’s an issue with the Java loader, which as a tiny native Mac OS application that simply launches the Java virtual machine and points it to the JAR file that contains the Java applet in question. If you have an old Mac OS application, chances are, it’s shipping with a PPC version of the Java Stub Loader, and that’s what’s triggering Rosetta. The good news is, it’s easy to fix, since the latest Intel-based Java stub loader on Snow Leopard can run any of your old JAR files easy as pie.
- Open Finder, and browse (command+shift+G) to
- Copy the file “JavaApplicationStub” to the clipboard (command+C)
- Now browse to the folder that contains the Java application in question.
- Right-click the Java application, and select “Show Package Contents” to view the actual app files in the OS X app bundle.
- Open the “Contents” subfolder, and then the “MacOS” folder.
- Paste the “JavaApplicationStub” file from the keyboard to here, and accept the overwrite prompt. You may need to enter your password when prompted as necessary.
- You’re done!