Make Old Java Applications Fully Snow Leopard Compatible

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?
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.

  1. Open Finder, and browse (command+shift+G) to
    /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/
  2. Copy the file "JavaApplicationStub" to the clipboard (command+C)
  3. Now browse to the folder that contains the Java application in question.
  4. Right-click the Java application, and select "Show Package Contents" to view the actual app files in the OS X app bundle.
  5. Open the "Contents" subfolder, and then the "MacOS" folder.
  6. 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.
  7. You're done!


Leave a Reply  •  About to Ask for Help?  •  Subscribe to Our Feed

18 Responses to “ Make Old Java Applications Fully Snow Leopard Compatible ”


  1. 1Ian, SydneySep. 15th, 2009 at 11:48 am

    Sounds great, but the very first step failed: No MacOS exisits in /System/Library/Frameworks/JavaVM.framework/Resources. How frustrating.

    Thanks anyway.

    Ian

  2. 2Eric, PhilippinesSep. 15th, 2009 at 12:50 pm

    Ian,

    I think the default of Finder is to open with your user folder selected. If you select your Mac's hardrive instead and run the search, "/System/Library/Frameworks/JavaVM.framework/Resources/MacOS/" will show up. (Or you can just navigate to it from there.)

    Hope this helps =)

    Thank you, Mahmoud Al-Qudsi, for the tip =)

  3. 3Mahmoud Al-QudsiSep. 16th, 2009 at 8:08 am

    Ian, if it's failing you may need to first download and install the latest version of Java.

    Eric, you are most welcome :-)

    -Mahmoud, Jordan

  4. 4Murray WilliamsSep. 16th, 2009 at 11:51 pm

    Thank you for the very useful information! Not only did it fix my problem but I learned some new tricks about Finder!

  5. 5PierreSep. 28th, 2009 at 10:33 pm

    Macromedia Dreamweaver MX2004 does not open with SL. I tried this method but it failed. You write "paste JavaStubLoader to the MacOS folder of the application (MX2004 for me)", but what I have copied from System is not JavaStubLoader but JavaApplicationStub, as you wrote! I am confused...! And it does help, MX 2004 still pops out and then goes back to sleep. MX2004 does not open. Sorry for asking for some more help. Pierre, France

  6. 6Darba piedāvājumiOct. 1st, 2009 at 11:23 am

    Thanks for tutorial. It was quite annoying before.

  7. 7george CrozerOct. 15th, 2009 at 11:45 pm

    When trying to insert a recordset using DW8 I get the error message

    (while executing insert object in Recordset.htm, the following Java script error(s) occurred At line 40 of file "MacHD:applications:Macromediadreamweaver:8:configurationobjects:server:Recordset.js":type error: sbFileDOM.parentWindow.applyServerBehavior is not a function)

    Im hoping this is a problem that can be fixed with your article?

    I have identified JavaApplicationStub but not sure what to do with it. I believe my dreamweaver 8 application is where the Java application is located but am unsure. could you help?? George

  8. 8SenthilOct. 20th, 2009 at 1:48 am

    This isn't working for me either. I have .jar files that I need to open, and now I seem to have no way of opening them. When I go into the Info window in Finder, I can't tell it to open with this JavaApplicationStub. It won't let me. What app do I open .jar files with now?

  9. 9spencerNov. 4th, 2009 at 6:14 pm

    Hi, I have a java app that uses libGL4JavaJauGljJNI14.jnilib but the jnilib is stuck in ppc mode, and i cant get this to work. I either need the libGL4JavaJauGljJNI14.jnilib to be compiled as x86, or need to run the whole program, including the jnilib in rosetta... any suggestions?

  10. 10MikeNov. 7th, 2009 at 6:31 pm

    Thanks, but im still having problems with my computer, it is running so slow, any tips?

    Mike

  11. 11MarkNov. 8th, 2009 at 10:45 pm

    @Pierre: this only works for applications written in java. Dreamweaver was not written in java, so sadly, you have to either run it in rosetta or update to an intel native version. @George Crozer: That appears to be a javascript error, not a java error. Despite the similar sounding names, javascript and java are wholly unrelated. Since it appears to be an error in the applications scripts, you might fix it by re-installing dreamweaver. If not, you should contact Adobe support.

  12. 12EmmaNov. 9th, 2009 at 9:05 pm

    I have a mac and it keeps telling me I need to download Java 1.6 to be able to use Limewire. It does not give me the option to download when I search the software update - can anyone help?

  13. 13WiseMaxDec. 2nd, 2009 at 11:55 am

    Emma:

    Please get the latest Java directly from Apple's Software Update in your computer.

    If in doubt about this, please see this Mac article from Apple:

    http://support.apple.com/kb/HT1338?viewlocale=en_US

    This should definitely help. If you go to the Java site downloads section, you will find Java for all platforms... except for Apple Mac! (http://www.java.com:80/en/download/manual.jsp?locale=en&host=www.java.com:80)

  14. 14dimitriDec. 21st, 2009 at 8:31 pm

    great it works

  15. 15kittJan. 15th, 2010 at 7:44 am

    Awesome. Thanks for the info! I have also been avoiding installing Rosetta. This fix helped with my install of Gallery Remote for gallery.sf.net. :) Thanks!

  16. 16fgJan. 27th, 2010 at 1:22 pm

    You made my day :-)

    Thanks a lot, now I can use JabRef with my Mac again - without "slowing down" Rosetta...

  17. 17DavidFeb. 12th, 2010 at 5:25 pm

    Very useful. (There's a typo on line 6 - you're still working with the JavaApplicationStub, not with a JavaStubLoader. And if you're a veteran Mac user just follow the path and duplicate the file, for goodness sake.)

    One thing that I wondered was whether the modified Java app would still run on a PowerPC machine. The answer, to my suprise, is Yes.

  18. 18Mahmoud Al-QudsiFeb. 12th, 2010 at 6:48 pm

    David, thanks for catching that. Updated the post accordingly :)

Leave a Reply