From bd960940e1299d69a6cdf4176cfd1f53a5dba83a Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Thu, 24 Jun 2010 12:52:51 -0700 Subject: [PATCH] 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 --- envsetup.sh | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/envsetup.sh b/envsetup.sh index ef731c1af..b2415e0b3 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -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 }