tags:

views:

2069

answers:

8

What are my options for running Java 6 on OS X?

I have an MacBook Pro Intel Core Duo running Mac OS X 10.4. Do I have any options for running Java 6 on this hardware and OS?

Related questions: Which Macs (either current or forthcoming) support 64-bit computing? Are there any Apple laptops (either current or forthcoming) that will have a 64 bit architecture?

Any relevant links would be appreciated.

+4  A: 

I thought all the current Macs were 64-bit?

http://support.apple.com/downloads/Java_for_Mac_OS_X_10_5_Update_1 for Java 6 support.

Brian Knoblauch
They are, and have been for a while.
Paul Tomblin
I did a little digging around and found "Core Duo" is 32 bit and "Core 2 Duo" is 64 bit. I have a "Core Duo" so I will not get any official Java 6 Apple support on my hardware.
Julien Chastang
I think all Macs shipped since Summer 2007 are Core 2 Duo or Xeon hardware and therefore 64-bit-capable. I'm pretty sure most of the product line updated to Core 2 Duo well before then, and it was only the Mac mini that was 32-bit until Summer 2007.
Chris Hanson
+3  A: 

Apple currently has very limited support for Java 6. There is no support on 10.4 at all, on top of that support to 10.5 is limited to only 64-bit. While this might not seem terrible since all new macs have a Core 2 Duo and support 64-bit, Safari is still a 32-bit app and thus can't run 64-bit plugins, such as the Java applet container.

Jeff Mc
+2  A: 

Unfortunately as for java 6 your only option is to wait until apple release it.

EDIT

Which by the way, had already happened for 10.5: http://support.apple.com/kb/HT2733 :)

This release updates Java SE 6 to version 1.6.0_07, J2SE 5.0 to version 1.5.0_16, and J2SE 1.4.2 to 1.4.2_18.

So I guess the only is to upgrade your OS :(

OscarRyz
Mmhh Let me guess where did those 2 downvotes came from B-)
OscarRyz
I down voted you because I believe you may be incorrect.
James McMahon
Its fair.. +1 for yours btw Looks like a bit for alpha geeks :S
OscarRyz
Yeah, it may be a completely pain in the to use, if the questioner comes back and says my solution is unworkable, I will take away my down vote.
James McMahon
+6  A: 

People out there are working on getting OpenJDK 6 to work on 10.4. I've never tried myself but soy latte, a Mac Os port of the BSD openjdk port, looks promising. The 10.4 version appears to be 32-bit only.

James McMahon
A: 

Your first question has been pretty thoroughly answered. To answer your second question: all Intel Macs are implicitly 64-bit capable and, with each release of OS X, the OS is becoming more and more 64-bit centric. (Unlike Windows, OS X doesn't differentiate into 32- and 64- bit versions.)

As I understand it, the next release, 10.6 will be almost completely 64-bit. You can learn a lot about 64-bit and OS X here.

In particular the page on the 64-bit transition is probably what you're looking for.

Mike Heinz
+5  A: 

Since the Core 2 Duo all available Intel macs are 64-bit capable. If your are an early adopter and have just like me a Core Duo-based Intel mac (note the missing 2), your computer is not 64-bit capable (see http://en.wikipedia.org/wiki/Core_duo).

The first Macbook (Pro) and Mac mini are examples for that.

However, as has been aforementioned with SoyLatte (http://landonf.bikemonkey.org/static/soylatte/) it is rather simple to get a running Java 6 on your Mac. I've walked through the installation steps and I could successfully run Java 6 applications (e.g. Osmosis http://wiki.openstreetmap.org/index.php/Osmosis).

The Apple Java 1.6 is only deployed on 64-bit capable Macs, i.e. even if you have Leopard you won't have Java 6 on your Core Duo Mac.

I may have suggested soy latte, but you went out and made sure it actually works. +1I am curious, did you find a 64bit version of soylatte for Mac OsX somewhere?
James McMahon
A: 

You can. Honestly, its not that hard too either (as of now, its dead easy). Java apps usually stand out (in a bad way), I would highly consider deploying with a more native language.

Rev316
+2  A: 

Leopard (OS X 10.5) was the first version of OS X to make the Java 6 (1.6) JRE available, through an update. Unfortunately, only the 64-bit version of the Java 6 JRE is available for Leopard, so only those with 64 bit Intel processors can run Java 1.6.

Since the Core 2 Duo, all available Intel Macs are 64-bit capable. If you have a Core Duo-based Intel mac (note the missing 2), your computer is not 64-bit capable. The first Macbook (Pro) and first Mac mini are examples of that. Your particular computer is 32-bit, so you don't won't get Java 6 with Leopard, and certainly don't have it with Tiger (10.4).

Snow Leopard (OS X 10.6) comes with Java 6 out of the box. So, if you get a new Mac with Snow Leopard, or you upgrade to Snow Leopard, it includes both a 32-bit and 64-bit version of Java 6. If you upgrade your 32-bit Intel Mac to Snow Leopard, you will get Java 6 (32-bit).

For those Intel Mac owners who do not wish to upgrade to Snow Leopard, or cannot upgrade (Snow Leopard requires 1 GB of RAM to install), you have the option of installing SoyLatte for Java 6.

SoyLatte (http://landonf.bikemonkey.org/static/soylatte/) is derived from the FreeBSD port of the Java 6 JRE and runs on the Mac. SoyLatte is only for Intel based Macs, and only includes the 32-bit JRE.

Simply download and extract SoyLatte, set your JAVA_HOME and PATH, and run your program. Here's a sample:

$ export JAVA_HOME=/Users/madams/Desktop/soylatte16-i386-1.0.3
$ export PATH=/Users/madams/Desktop/soylatte16-i386-1.0.3/bin:$PATH
$ java -jar /Users/madams/Desktop/test.jar

Also, note that Snow Leopard includes only Java 6, and automatically removes older JREs. This means, no more Java 1.5, though the paths for previous versions are linked to the current one.

In addition, Java 6 in Snow Leopard defaults to the 64-bit JRE on 64-bit Macs, so if you are calling 32-bit native libraries (JNIs), it will fail. You must call java using the -d32 command line option to run the 32-bit version of the Java JRE on a 64-bit Mac with Snow Leopard.

Marcus Adams
+1, thanks for the update!
Jonik