On T 8 Jan, 2008, at 20:41 , Chad Junkermeier wrote:
Several days ago I posted a question about getting Java 6 to work
with Xcode 3.0. I got several answers to my initial inquiry. I am
still hoping to find an answer to my last post.
Chad
Begin forwarded message:
I am sorry if this is going to sound dumb (my previous experience
with Xcode is using it as a text editor to do Fortran programming),
but I don't know where to set the $JAVA_HOME environment variable.
I have looked in Project > Edit Project Settings > Build and I have
double clicked on the target, but in neither place have I found
$JAVA_HOME.
Thanks for your help.
Chad
As this was never answered completely, and as I have also been bitten
by ant not automatically looking at the javac set by Java Preferences,
here is the answer you were looking for:
Project->Edit Project Settings
go to the "build" tab
select the desired Configuration (usually Debug and Release) and Add
User-Defined Settings (is in the gear icon button at the bottom left).
The Title will be JAVA_HOME (no $) and the Value the path to the
desired location of java /System/Library/Frameworks/JavaVM.framework/
Versions/1.6/Home in 1.6 case.
Note: this is not the only method. Even if you set your Java
Preferences to use 1.6, this does not seem to apply to the JDK. Indeed:
ls -l /System/Library/Frameworks/JavaVM.framework/Versions/
so, if you delete CurrentJDK and recreate a link to 1.6 as in:
cd /System/Library/Frameworks/JavaVM.framework/Versions/
sudo rm CurrentJDK
sudo ln -s 1.6 CurrentJDK
ant will compile fine for source and target 1.6 without having
JAVA_HOME set as above.
I prefer though to have a less pervasive change.
Giuliano
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden