Topic : Need Java 1.5 As Default

Topic Archived This topic has been archived - replies are not allowed.




            Permlink
            Replies : 4 - Pages : 1 - Last Post : Dec 8, 2005 4:05 AM by: Paulo Gabriel F...
Rawn027


Posts: 17
From: New York
Registered: Dec 3, 2004
Need Java 1.5 As Default
Posted: Nov 2, 2005 11:15 PM

How do I make java 1.5 default when compiling java source code in terminal. I need this for my java programming class. Thank you.

   
datenimperator

Posts: 11
Registered: Nov 18, 2005
Re: Need Java 1.5 As Default
Posted: Nov 18, 2005 7:58 AM   in response to: Rawn027

Simply relink "CurrentJDK" in /System/Library/Frameworks/JavaVM.framework/Versions to whatever version you need. Do not touch all the rest, /Library/Java/home will be properly linked automatically.

You can do this in the Terminal using

sudo rm -f CurrentJDK && sudo ln -s 1.5.0 CurrentJDK

Regards,

Christian

Powerbook G4 17"   Mac OS X (10.4.3)  
Jean-Guy Arsena...


Posts: 22
From: St-Romuald, Québec
Registered: May 9, 2005
Re: Need Java 1.5 As Default
Posted: Nov 18, 2005 8:07 AM   in response to: datenimperator

Hi,

You can use "Java Preferences" in folder "Utilities -> Java -> J2SE 5.0" to set Java 1.5 as default.

PowerMac G4 1.4 Ghz   Mac OS X (10.4.2)  
Jean-Guy Arsena...


Posts: 22
From: St-Romuald, Québec
Registered: May 9, 2005
Re: Need Java 1.5 As Default
Posted: Nov 18, 2005 8:13 AM   in response to: Jean-Guy Arsena...

hi,

I made a mistake. This is only for select Java 1.5 for using as default with navigator like safari.

PowerMac G4 1.4 Ghz   Mac OS X (10.4.2)  
Paulo Gabriel F...

Posts: 6
From: Niterói, Rio de Janeiro, Brazil
Registered: Jan 3, 2005
Re: Need Java 1.5 As Default
Posted: Dec 8, 2005 4:05 AM   in response to: Rawn027

Dear Friends,
I got the same problem and find as shown below, from VersioTracker the coments to change and get the 1.5 as default. But, how to do it? I cann't finde the .profile ou even the .bash_profile. I've tried by the Java Preference but it didn't work!!!!
Thanks a lot!!!!!

(1) Modifying your system environment variables for Java, so that the 1.5 command-line tools and applications are found first. You do this by modifying your .profile or .bash_profile and adding these two lines:

export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home"
export PATH="${JAVA_HOME}/bin:${PATH}"

Power Book G4 17   Mac OS X (10.3.9)