# Pastebin 6m8LTqHx alias jls='/usr/libexec/java_home -V 2>&1 | cut -d , -f 1 | colrm 1 4 | grep -E "\d\.\d\.\d"' function jdk() { export JAVA_HOME=$(/usr/libexec/java_home -v $1) export TMP_PATH= for i in `echo $PATH | tr ":" "[:space:]"` do export T=`echo $i | grep -v JavaVirtualMachines` if [ "a$T" != "a" ] then if [ "a$TMP_PATH" = "a" ] then export TMP_PATH=$T else export TMP_PATH=$T:$TMP_PATH fi fi done export T=`echo $JAVA_HOME | grep JavaVirtualMachines` if [ "a$T" != "a" ] then export TMP_PATH=$JAVA_HOME/bin:$TMP_PATH fi export PATH=$TMP_PATH }