|
|
Command-line Java
|
|
|
|
Fresh-Faced Recruit
Join Date: Jul 2006
Status:
Offline
|
|
Hi there,
I'm new to macs, so while this is probably a silly question, I haven't been able to figure it out, so help would be appreciated
I'm doing a subject at Uni on Java programming, and am trying to configure my mac so I'm using the correct version of Java (Java 1.5). I know I can use Xcode, and I'm pretty sure that Xcode runs off Java 1.5, but in case I want to use the Terminal to compile and run, I'd like to get this happening too. The faq's at the developer.apple.com site say that any command-line prompts, like java or javac use Java 1.5, but when I type "java -version" into the terminal, it tells me it's using Java 1.4.2. How do I change this?
Thanks in advance for your help!
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
|
|
|
|
|
|
|
Junior Member
Join Date: May 2003
Status:
Offline
|
|
First, go to /Applications/Utilities/Java. Do you have a folder called J2SE 5.0? If you don't then you need to install java 1.5, it should be in software update. If you have that, then open that folder, and open the Java Preferences app. Use that to tell your computer to use java 1.5 by default. Save and close. Try java -version again, and see if that has fixed it. If that doesn't work, there is some terminal hackery you can do, which I vaguely recall having to do, but I'll need to look it up.
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: May 2003
Status:
Offline
|
|
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
If you installed the last Java release, your default version should be 1.5.
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Jul 2006
Status:
Offline
|
|
Thanks patman, that did the trick
That's what I thought too Chuckit, but for some reason, that wasn't the case
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|