Skip to content

Instantly share code, notes, and snippets.

View donchesworth's full-sized avatar

Don Chesworth donchesworth

View GitHub Profile
@donchesworth
donchesworth / .bash_profile
Last active February 28, 2020 12:01
switch between java versions
# from Johan Haleby
# added by DOC to toggle java versions
function setjdk() {
if [ $# -ne 0 ]; then
removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin'
if [ -n "${JAVA_HOME+x}" ]; then
removeFromPath $JAVA_HOME
fi
export JAVA_HOME=`/usr/libexec/java_home -v $@`
export PATH=$JAVA_HOME/bin:$PATH
source ~/.profile
hstart
hive
hstop