You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/bin/bash
#env variables can be changed only if we call the script with source setJava.sh
function removeFromPath () {
export PATH=$(echo $PATH | sed -E -e "s;:$1;;" -e "s;$1:?;;")
}
if [ -n "${JAVA_HOME+x}" ]; then
removeFromPath $JAVA_HOME
fi
oracleJava="/c/Program Files (x86)/Common Files/Oracle/Java/javapath"
case $1 in
unset)
removeFromPath $oracleJava
export JAVA_HOME=
;;
8)
export JAVA_HOME=/c/ENGINE_LIB_DIR/build/java/win32/x86_64/jdk8u202-b08
;;
11)
export JAVA_HOME=/c/ENGINE_LIB_DIR/build/java/win32/x86_64/jdk-11.0.5+10
;;
pai11)
export JAVA_HOME=/C/ENGINE_LIB_DIR/build/java/win32/x86_64/pai-openjdk-11.0.5.10_windows-x64
;;
*)
echo "usage error: setJava <version>\n version can be one of unset, 8, 11, pai11"
;;
esac
echo JAVA_HOME=$JAVA_HOME
export PATH=$JAVA_HOME/bin:$PATH;
java -version
The text was updated successfully, but these errors were encountered:
Title, see script below (adjust for debian)
The text was updated successfully, but these errors were encountered: