Ubuntu Theme – Arc or Materia

Bash function to switch Java versions

setjava() { if [ “$1” = “-q” ]; then local quiet=true shift fi local jdk=~/Applications/Java/jdk1.$1 if [ ! -d “${jdk}” ]; then echo Jdk not found: ${jdk} return 1 fi export JAVA_HOME=${jdk} export PATH=${JAVA_HOME}/bin:${PATH} if [ -z “${quiet}” ]; then java -version fi } export -f setjava I have symlinks for all major versions of […]