Sign in
gerrit
/
gerrit-ci-scripts
/
9d3513d9a40178329a088721c280bab50ccc84f8
/
.
/
jenkins-docker
/
slave
/
set-java.sh
blob: 4203060128c9d3803da11b7205164add847fb9f7 [
file
] [
log
] [
blame
]
#!/bin/bash
if
[
"$1"
==
""
]
then
echo
"Set current Java version level"
echo
""
echo
"Use: $0 <7|8>"
exit
1
fi
export JAVA_HOME
=/
usr
/
lib
/
jvm
/
java
-
$1
-
openjdk
-
amd64
export PATH
=
$JAVA_HOME
/
bin
:
$JAVA_HOME
/
jre
/
bin
:
$PATH
echo
"Java set to: $(which java)"