Ignore STAY_OFF_MY_LAWN when setting JAVA_HOME.

Don't check STAY_OFF_MY_LAWN in set_java_home.  That function already
refuses to update JAVA_HOME if it's set to something, which should
be sufficient for anybody who doesn't want the script to mess with it.

With this change, you can get the benefits of the 1.5/1.6 auto-selection
without having to suffer through window title changes.

Change-Id: I5cfc5d6fdf26a10b42b52925f877012c0506b9a5
This commit is contained in:
Andy McFadden 2010-06-24 12:52:51 -07:00
parent c1ab82ae6b
commit bd960940e1
1 changed files with 9 additions and 11 deletions

View File

@ -1068,17 +1068,15 @@ function godir () {
# Force JAVA_HOME to point to java 1.6 if it isn't already set
function set_java_home() {
if [ "$STAY_OFF_MY_LAWN" = "" ]; then
if [ ! "$JAVA_HOME" ]; then
case `uname -s` in
Darwin)
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
;;
*)
export JAVA_HOME=/usr/lib/jvm/java-6-sun
;;
esac
fi
if [ ! "$JAVA_HOME" ]; then
case `uname -s` in
Darwin)
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
;;
*)
export JAVA_HOME=/usr/lib/jvm/java-6-sun
;;
esac
fi
}