This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

Specific version of jdk for Mac OS

Apr 4th, 2011, 02:11 PM

Hi,

I'm a Java Developer and currently I've a Macbook Pro at work.
Until now, I don't had any problem during the development but now I need to release a product using Maven and I need specifics versions of JDK (32bits) installed.

We have products that needs jdk 1.4, 1.5 and 1.6.

There is a simple way for resolve this problem or I need to find the older versions of jdk 1.4 and 1.5 of Leopard and change the links on /Systems/Library/... ?

As far as I know you can download the JDK package for Snow Leopard (if you are running 10.6 on your machine) from Apples Developer area. That contains the latest 1.6 JDK which includes 64bit and 32bit VMs.

I am not sure how you can install later JDKs on 10.6, but I remember vaguely that I've found some articles on that via Google search. But since the JDKs are backwards compatible, you should be able to run a 1.4-based system on a 1.6 VM. And from Eclipse you can set the compiler level to 1.4, for example, to make sure the compiler produces 1.4-compatible .class-Files.

I think there are solutions for installing older JDKs on Mac, but they aren't trivial as far as I know. I would implement those two methods and set the compiler target to 1.4 or 1.5, whatever you need.

I don't know exactly what you mean with the 64bit or 32bit builds? To what kind of build are you referring to? As long as you are just compiling and shipping pure Java code, you don't need to worry about 32bit vs. 64bit. The JVM itself is a 32bit or 64bit one an can therefore deal with different heap sizes, or if you have native code as part of your project, you should take care to compile that for the right bit number, but for pure Java, you don't need to care.