Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How do I install the Java SDK?

I am working with software that requires the Java SDK 1.5.0 or later. I have the Xcode developer tools installed, and I don't recall previously installing the Java SDK.

1) Does the Java SDK come with the XCode developer tools?
2) How would I verify if the Java SDK is already installed? (I case I did install it on this machine, but then forgot about it.)
3) What is the best way to install the Java SDK? On Sun's website I don't see any explicit mention of Mac support, so I'm not sure if I just download the Linux package.

My current Java version is the following:

$ java -version
java version "1.5.0_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-164)
Java HotSpot(TM) Client VM (build 1.5.0_07-87, mixed mode, sharing)

Thanks for your help.

Mac Mini Duo 1.66 GHz, 2 GB (10.4.6); MacBook (10.4.8), Mac OS X (10.4.9)

Posted on Apr 6, 2007 1:13 PM

Reply
Question marked as Best reply

Posted on Apr 6, 2007 2:57 PM

Hi bill

You would appear to have everything you need already installed on your computer, so you can get started at once.

For information on how to use Java and Xcode check out the worksheets available from this page:
http://www.cems.uwe.ac.uk/~lrlang/javasoundmusic/index.html#worksheets

Bob
3 replies

Apr 6, 2007 3:05 PM in response to billmcn

It does appear that I have everything I need.

After a little more grepping around on the command line I think I have an idea what is going on here. The Java stuff is under

/System/Library/Frameworks/JavaVM.framework

Specfically, the JDK directory is under

/System/Library/Frameworks/JavaVM.framework/Home

This is a softlink to the home directory of the current JDK. Ultimately this points to

/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/

Which presumably means I have Java SDK version 1.5.0.

So I should be good to go. And if any apps need my JAVA_HOME environment variable, I set it to

/System/Library/Frameworks/JavaVM.framework/Home

Is this all correct?

Mac Mini Duo 1.66 GHz, 2 GB (10.4.6); MacBook (10.4.8)

Apr 6, 2007 11:46 PM in response to billmcn

Hi Bill

It does appear that I have everything I need.

After a little more grepping around on the command
line I think I have an idea what is going on here.
The Java stuff is under

/System/Library/Frameworks/JavaVM.framework

Specfically, the JDK directory is under

/System/Library/Frameworks/JavaVM.framework/Home

This is a softlink to the home directory of the
current JDK. Ultimately this points to

/System/Library/Frameworks/JavaVM.framework/Versions/1
.5.0/

Which presumably means I have Java SDK version
1.5.0.

So I should be good to go. And if any apps need my
JAVA_HOME environment variable, I set it to

/System/Library/Frameworks/JavaVM.framework/Home

Is this all correct?


Yes, indeed it is all correct. I can't understand Apple's thinking in that it retains Java 1.3, 1.4.1, 1.4.2 and 1.5 on the same system! Most Windows users would simply download the latest version from Sun's website and use it!

The CurrentJDK soft link specifies your default Java which for now should be Java 1.5. You can change the soft link to select a new default version, but if you do this then you should also execute the Java Preferences application which you'll find in /Applications/Utilities/Java

If you use Xcode then you still need to specifically select 1.5 as your Java version for each and every project. The way to do this is described in my worksheets.

FWIW, there's a preview (beta) version of Java 6.0 now available for download on Apple's Developer web site.

Bob

How do I install the Java SDK?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.