profile.d/env.sh: add jre and jdk bin dirs to PATH if respective components are installed
This commit is contained in:
parent
a85245097d
commit
a031cc00f0
@ -1,3 +1,9 @@
|
|||||||
[ -x /usr/lib/jvm/jre/bin/java ] && JAVA_HOME=/usr/lib/jvm/jre
|
[ -x /usr/lib/jvm/jre/bin/java ] && {
|
||||||
[ -x /usr/lib/jvm/jdk/bin/javac ] && JAVA_HOME=/usr/lib/jvm/jdk
|
JAVA_HOME=/usr/lib/jvm/jre
|
||||||
[ "$JAVA_HOME" ] && export JAVA_HOME
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user