X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fcustomize%2Ffred%2Fjava_profile.sh;h=7c4ce0c97c737e776cb8a8033647786210056741;hb=f7c28dab06ee47d0f28e97ed98cecb400f5aa2cc;hp=92a4f52a6bfb4e88391fd7b133270a60d45417ef;hpb=7091f47876880d2aaebd1804fd3d1f002c855273;p=feisty_meow.git diff --git a/scripts/customize/fred/java_profile.sh b/scripts/customize/fred/java_profile.sh index 92a4f52a..7c4ce0c9 100644 --- a/scripts/customize/fred/java_profile.sh +++ b/scripts/customize/fred/java_profile.sh @@ -22,20 +22,23 @@ function intuition_failure() ############################ -# set some fairly liberal limits for ant. -#no. export ANT_OPTS="-Xms512m -Xmx768m -XX:MaxPermSize=768m" - -############################ - # start guessing some settings... +# whatever we figure out, we want to export the java home variable. +export JAVA_HOME + # this bin portion works for most javas... export JAVA_BIN_PIECE=bin -# try using java itself if we can. -#if [ ! -d "$JAVA_HOME" ]; then +# try using java itself to locate the JAVA_HOME if we can. +if [ ! -d "$JAVA_HOME" ]; then + JAVA_HOME=$(java -XshowSettings:properties -version 2>&1 | grep -i java.home | sed -e 's/.*java.home = \(.*\)$/\1/') +fi -#fi +# if that didn't work, then we try a series of random bizarro places where +# we have seen java live before. + +#hmmm: below list is way out of date. we really hope the first attempt above works. if [ ! -d "$JAVA_HOME" ]; then # try a recent version. @@ -132,6 +135,10 @@ if [ ! -z "$ECLIPSE_DIR" ]; then fi export PATH=$e:$PATH fi +# add in our personal bin path. +if [ -d "/usr/local/fred/bin" ]; then + export PATH=/usr/local/fred/bin:$PATH +fi ############################