# HG changeset patch # User Jeff Hammel # Date 1558737251 25200 # Node ID 79b52aec477e34adcf758ab9133223550496031e # Parent e641fdf325bb7df0b9c5a15aa0b5bba4e7053f35 function for java_home diff -r e641fdf325bb -r 79b52aec477e .bashrc --- a/.bashrc Sat May 11 14:39:45 2019 -0700 +++ b/.bashrc Fri May 24 15:34:11 2019 -0700 @@ -599,6 +599,10 @@ while read line; do echo ${line} : $(($(test "-e ${line}"\") )); done } +java_home() { + /usr/bin/env java -XshowSettings:properties -version 2>&1 | grep "java.home" | awk '{ print $NF; }' +} + ### ruby version manager [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting