Java 5.0 for Mac OS X 10.4.x

I can’t seem to find a download that actually works!! I get a corrupted DMG somehow. Anyone got any pointers?

Cas :slight_smile:

What URL are you using?

The J2SE 5.0 box on the right of this page has a link to:
http://www.apple.com/support/downloads/java2se50release1.html

The download link there resolved to:
http://apple.speedera.net/download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/Mac_OS_X/downloads/061-1300.20050429.JV5RL/Java15Release1.dmg

Could be the mirror that it is feeding you is hosed.

Got one eventually. Not sure how to make it the default VM now (I’ve twiddled the preferences for Webstart but making it the default system VM isn’t obvious).

Cas :slight_smile:

You mean you want it to be the default with someone types “java” at the command line?

That is not officially supported (because Apple thinks you are goign to use WebStart or Applications bundles, and they specify 1.5+ if they need Java 5 features)

You can change the symlink at /usr/bin/java.

But what I did was make an alias “java5”:
scotts-laptop:~ scottpalmer$ alias
alias java5=’/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/java’
scotts-laptop:~ scottpalmer$

Do NOT change the the symlinks in /System/Library/Frameworks/JavaVM.framework/Versions. (i.e. the “Current” symlink)
That will hose things, even though it might appear to work.

Cheers, I’ll have a go with that and see if Eclipse gets any perkier.

Cas :slight_smile:

Oh, if you want eclipse to use Java 5 you might have a harder time.

The launcher for Eclipse is special on the Mac. It has to do with the fact that Eclipse uses SWT and AWT and SWT don’t get along because each one wants to own the Cocoa event loop, which must run on the application’s main thread. Apple actually added a -XstartOnFirstThread parameter to allow applications that do stuff like SWT to work with the standard Apple java command.

It might be that the launcher is not easily configured to use Java 5… hmm… let me take a look at the Eclipse application bundle… I see the Info.plist file has what appear to be command line options listed in an array under the key “Eclipse”… maybe there is an option to specify the JRE, just as there is for Windows… (e.g. -vm)… I think I know the guy to ask… I’ll fish his email out of the Apple java-dev mailing list…

One thing to note though… there is no server VM for the Mac… File a bug report with Apple so they know you want one. The -server option is accepted by Apple’s java launcher, but all it does is reconfigure some memory parameters and compile thresholds etc, to be more “server-like”, the actually JVM is still the client JVM.