Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ilantal

macrumors newbie
Original poster
Nov 29, 2012
11
0
Haifa, Israel
When I compile a make file the Mac picks up Java 1.7 and compiles using 1.7.
For a particular problem I need Java 1.6 and I want to change the default Java to 1.6. If I look in System/Library/Frameworks/JavaVM.frameword/Versions I see 1.6 (and 1.5 and 1.4) installed, plus "A" which is most likely 1.7.

I see there used to be an application called Java Preferences where I could set which Java to use but I no longer see that application.

In short, how do I tell the system to use 1.6?
Thanks,
Ilan
 

ScoobyMcDoo

macrumors 65816
Nov 26, 2007
1,188
37
Austin, TX
It seems once the 1.7 is installed from Oracle, the 1.6 JDK gets lost somewhere. The new oracle java stuff and the old apple supplied java stuff do not want to play nicely together.

I just gave up on that and compiled using 1.7, but targeting 1.6. Will that do for you?
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,484
16,200
California
It seems once the 1.7 is installed from Oracle, the 1.6 JDK gets lost somewhere. The new oracle java stuff and the old apple supplied java stuff do not want to play nicely together.

I just gave up on that and compiled using 1.7, but targeting 1.6. Will that do for you?

I know 1.6 is still there because the 1.7 install broke the Crahsplan app and I had to use these steps to point Crahsplan back toward 1.6. I don't know if this will help OP though.
 

ScoobyMcDoo

macrumors 65816
Nov 26, 2007
1,188
37
Austin, TX
I did some browsing around and see people give screen shots of the java preferences panal having both 1.6 and .17 JVMs available. Mine only shows 1.7. However I do still have the /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Commands in tact.
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,484
16,200
California
I did some browsing around and see people give screen shots of the java preferences panal having both 1.6 and .17 JVMs available. Mine only shows 1.7. However I do still have the /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Commands in tact.

Those are old. There was an Apple update that removed that Java control panel in those screenshots. Too bad, because it allowed you to prioritize which Java version was used form local apps.
 

ilantal

macrumors newbie
Original poster
Nov 29, 2012
11
0
Haifa, Israel
Thanks for the suggestions. If the Java preferences panel still existed, it would do the job nicely. If Apple removed it, I'm stuck.
I don't know how to target the compile to use 1.6. This is a huge VTK compile and somewhere inside it, it reads what Java is available. I may have to go to VTK and ask how I can manually target a specific Java.
I was hoping for something like a Java preferences panel which would do the job for me. If Apple removed it - Catch 22.
 

ilantal

macrumors newbie
Original poster
Nov 29, 2012
11
0
Haifa, Israel
Thanks JediMeister. I thought for a while that your suggestion would work. At least after I made the changes according to your post it did NOT inform me that it found Java 1.7. It simply didn't say what it was using, so I hoped that meant it was using 1.6.
After recompilation I still see the message about trying to retrograde the jar file, and it still fails to do so. I don't know how to confirm if it is using 1.7 or 1.6 (by looking at the jar file itself).
Likewise I don't know how to tell it that I want to use 1.6 and not 1.7 when I do the compilation.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.