Mercurial > hg > zsh-env
view zshrc-jdk @ 152:62c9cbe45942
update JDK11 path
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Mon, 04 Feb 2019 09:29:36 +0100 |
parents | 238d7d13bce7 |
children | aa8f422d55ae |
line wrap: on
line source
# # zshrc for handling different JDK versions # switchJdk() { local jdkName="$1" local new_path=`removeFromPath "jdk"` export JAVA_HOME=`/usr/bin/java-config-2 --select-vm=${jdkName} -O` export JAVAC=${JAVA_HOME}/bin/javac export JDK_HOME=${JAVA_HOME} export PATH="${JAVA_HOME}/bin":"${new_path}" java -version } jdk8() { switchJdk "oracle-jdk-bin-1.8" } jdk11() { export JAVA_HOME=/opt/openjdk-bin-11.0.2_p7 local new_path=`removeFromPath "jdk"` export PATH="${JAVA_HOME}/bin":"${new_path}" java -version }