diff --git a/profile.d/env.sh b/profile.d/env.sh index 5c3667b..d95bd56 100644 --- a/profile.d/env.sh +++ b/profile.d/env.sh @@ -1,3 +1,9 @@ -[ -x /usr/lib/jvm/jre/bin/java ] && JAVA_HOME=/usr/lib/jvm/jre -[ -x /usr/lib/jvm/jdk/bin/javac ] && JAVA_HOME=/usr/lib/jvm/jdk -[ "$JAVA_HOME" ] && export JAVA_HOME +[ -x /usr/lib/jvm/jre/bin/java ] && { + JAVA_HOME=/usr/lib/jvm/jre + PATH=$PATH:/usr/lib/jvm/jre/bin +} +[ -x /usr/lib/jvm/jdk/bin/javac ] && { + JAVA_HOME=/usr/lib/jvm/jdk + PATH=$PATH:/usr/lib/jvm/jdk/bin +} +[ "$JAVA_HOME" ] && export JAVA_HOME PATH