Jump to content
  • Advertisement
Sign in to follow this  
sid57

jdk 1.5 in OSX (Tiger) questions

This topic is 4807 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello Can anyone help me figure out how to get a mac OS 10.4 machine to compile using the jdk 1.5.0_02?? Up until this point, using 1.4.2 was easy, as it's integrated into the OS. After having installed the J2SE 5.0, and setting the application priority to 5.0, I still fail to compile using the 1.5 spec. I am using jEdit and XCode. whenever I use javac, it defaults to 1.4.2. I need to get it to default to 1.5 to take advantage of the new commands (my work actually requires this).

Share this post


Link to post
Share on other sites
Advertisement
If you're compiling with javac, add "-source 1.5"

If you're compiling with XCode, I dunno, but there's got to be some option in the project settings to compile as 1.5.

Share this post


Link to post
Share on other sites
Did you read this?
Quote:
From the page
This update does not change the default version of Java on your Mac from Java 1.4.2 to J2SE 5.0, though Java applications that require J2SE 5.0 may specifically request it. If you want to change the default Java version for applications and applets, use the new Java Preferences utility that is installed by the J2SE 5.0 update at /Applications/Utilities/Java/J2SE 5.0

Share this post


Link to post
Share on other sites
Unfortunately, that was the first thing I'd done. Somehow, I have to explicitly tell my system to compile exclusively in 1.5. I've set up the j2se (1.5.0_04) on multiple winXP systems throught the environment variables. The problem is, is that on a mac, you CAN have multiple versions installed. The precedence outlined on apple's dev website is a method that will not change a compiler's defaults. I believe that this is what I may have to do. Problem is, I have no idea how to do it.

But thank you Nychold, I appreciate that there are people out there who want to help me.
:)
ANY ADVICE IS WELCOME
Sid

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
try this...

in xcode 2.1 go to Targets in the "groups and files" list and double-click the target for your app. A new window should open. Now go to "Java Compiler Settings" and change the Target VM Version to 1.5.

Other versions of xcode are probably the same.

Share this post


Link to post
Share on other sites
fixed by going
sudo su
ln -sf /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/javac /bin/javac
ln -sf /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/java /bin/java

Share this post


Link to post
Share on other sites

eedok helped me re-assign the default path for my java compiler. Having two separate versions of Java is a real pissoff.

Thank you everyone for your help. I greatly appreciated it :)

sid

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!