tags:

views:

56

answers:

2

Sorry if this seems like it's for SuperUser. I just deleted it there :)

I am running this command on OSX

/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin/java -version

and the response is

java version "1.6.0_17"

Is there any way to really run an older version of Java without downloading to a makeshift location?

OSX 10.6.2.

+1  A: 
/System/Library/Frameworks/JavaVM.framework/Versions

can contain multiple versions. The symlink Current will point to the preferred, but you can choose which one to run just by specifying the path (as you've done above)

Brian Agnew
I think a clean install of SnowLeopard only gives you 1.6, though.
Paul Tomblin
But that doesn't preclude your downloading another version. Brian's answer is to the point and addressing the question regarding "makeshift location".
Hi Brian, no you cannot, as the question states. You can also NOT download other versions for 10.6, or at least not from Apple/Sun.Mine is an upgrade 10.6 and it still only gives you Java 1.6
Yar
@yar - that's not what you asked. mipadi's answer demonstrates how to get different JDKs/JREs. I'm currently looking at versions 1.3/4/5/6 JDKs on my Snow Leopard machine
Brian Agnew
@Brian, perhaps you're right, my point was that running the JVMs in versions does NOT actually give you different vesions by default. Thank you for your answer.
Yar
+4  A: 

Only Java 6 is available on Snow Leopard. The JavaVM framework has links for 1.4 and 1.5, but both of those links point to "CurrentJDK", which in turn points to 1.6, so even if you invoke the java executables in the 1.5 directory, you still get the 1.6 (Java 6) executable.

If you really need (32-bit) Java 5, you can get it by following these instructions.

mipadi