3/16/2009

Java 1.6 on a 32-bit Core Duo Mac

I have a first generation Macbook Pro (Core Duo 2.0 GHz, 2.0G, etc) with Mac OS X 10.5.X. It's a really nice machine and has held up well for the past couple of years. It works beautifully.

Everything works well, except Apple doesn't support Java 1.6 on 32-bit Intel Macs, which applies to the Core Duo. My primary skillset, (other than UNIX/Linux), revolves around Java. I admit, I was about to sell my laptop and head to the Apple Store, when I found a few links that can ease the pain.

I found a link on Tomas Varaneckas', (Paranoid Engineering), blog about SoyLatte, a Java 6 release for Mac OS X based on a FreeBSD patchset.

I am going to assume you have basic UNIX command knowledge. I opened a Terminal, and changed to the JavaVM.framework/Versions directory.
cd /System/Library/Frameworks/JavaVM.framework/Versions/
I uncompressed and extracted the files from the intel 32-bit soylatte*tar.gz archive.
bunzip2 -c ~/Downloads/soylatte16-i386-1.0.3.tar.bz2 | sudo tar xvf -
I renamed 1.6/Home to 1.6/Home.bak and symlinked the soylatte directory to 1.6/Home.
sudo mv 1.6/Home 1.6/Home.bak
cd 1.6
sudo ln -s ../soylatte16-i386-1.0.3 Home
There is general information in the links above for how to use the SoyLatte JDK. I use IntelliJ Idea and Eclipse for Java development. I simply point the IDE configuration to the 1.6 directory to add the JDK.

7 comments:

sauy7 said...

When you state, "I simply point the IDE configuration to the 1.6 directory to add the JDK." how did you do that? Is it in the info.plist? Or are you running Intellij IDEA as an X application, rather than natively?

Unknown said...

In Idea, add a JSDK, I select the JDK HOME as /System/Library/Frameworks/JavaVM.framework/Versions/1.6 and it detects it. I've been able to use it fine, mostly.

For eclipse, I can't remember.

sauy7 said...

Ah, that's on a project basis. I need Intellij IDEA to use Java 1.6 for a plugin that has been compiled on 1.6 and will not work on 1.5. Soylatte is not recognised by IDEA for this purpose.

Unknown said...

When I start Idea with soy latte as the JDK, Idea does start up as an X application, rather than OS X native. Is the plugin available via Jetbrains website?

sauy7 said...

Plugin is this one: http://community.versionone.com/Downloads/Reference%20Implementations/Forms/DispForm.aspx?ID=66

I've recompiled it on Java 1.5 and it now appears in settings but I have another issue with it (regarding Windows Authentication for login) that I'm discussing in the Google groups for it. I'm not yet sure if this is to do with 1.5 vs 1.6 or a Windows Authentication on Mac issue in the Java library used.

I don't want to run IDEA as a X application.

chamanzan said...

Just a quick note of thanks ... read your blog and solved my problem :-)

Unknown said...

Snow Leopard appears to have java 1.6 for 32-bit macs. Sneaky!