- A Concurrent Affair - https://www.concurrentaffair.org -

Java Versions on the Mac

Stephen had some questions about Java on the Mac. I tried to answer them.

From the DrJava site, I see notes that a JDK is already installed on OS X machines—that explains why I can’t find downloads for it.

There are some Java downloads from Apple [1], but they’re hard to find and
meant for developers (Apple ID required).

I have a couple of questions about it though:

Here are some answers from Apple: Mac OS X Java Frequently Asked Questions (FAQ) for developers [2].

a) Is it a 32-bit or a 64-bit JDK?

As far as I know, Macs have both a 32-bit and a 64-bit JDK installed. If I understand this page [3] correctly, by default, the 32-bit JVM is running.

I don’t have a 64-bit Mac, though, so I don’t have any experience with 64-bit Mac JVMs.

b) Does the Mac run some sort of auto-updating process on it – how do you know what version it is running and how do you get a newer version if needed?

This is what the FAQ says:

Java updates usually stand alone, allowing you to choose when an update is appropriate. However, it is always recommended to check the description and release notes for all software updates to see which technologies are affected. Major upgrades such as Mac OS X Leopard typically update Java as well.

It’s been such a long time since I’ve had a Java update on my 10.4 32-bit MacBook, but I think new versions of Java appear in the “Software Update” list (see Apple menu).

The reason I ask is that for running Eclipse, one needs to know if you’re running a 32-bit or 64-bit version because not only are different plug-ins needed, but the install procedure can be different as well. Also, we need to know what version of Java people are running on their Macs.

On the command line: java -version

The sun.arch.data.model property may also help, it should be "32",
"64" or "unknown". You can get the value by calling System [4].getProperty("sun.arch.data.model"), for example in the DrJava Interactions Pane (see Oracle FAQ entry [5]).

Here is some more Apple-specific information about Java versions [6].

Hope this helps.

Update

Corky said what I had written about “by default, the 32-bit JVM is running” had confused him. He wondered: “Is a 32 bit version of Java 6 now available on Leopard?”

No, there’s still no 32-bit Java 6 from Apple for Tiger (10.4).

It seems like the -d64 switch is a mode, like -server or -client, and that on the Mac both the 32-bit and the 64-bit JVMs are rolled into one. On Windows, Linux and Solaris, there are 32-bit and 64-bit JVMs that need to be installed separately.

[7] [8]Share [9]