# Profile for Java JDK and JRE setvar JAVADIR = "$(javaiffind)" if test $JAVADIR{ export JAVA_HOME=$JAVADIR if test -d "$JAVADIR/jre" { #JDK export JRE_HOME=$JAVA_HOME/jre if test -d /opt/android/android-studio/bin{ export STUDIO_JDK=$JAVA_HOME } export PATH=$(echo ${PATH} | sed 's%:[^:]*/j[dr][ke]-*[1-9/][^:]*%%g'):$JAVA_HOME/bin } else { export JRE_HOME=$JAVA_HOME export PATH=$(echo ${PATH} | sed 's%:[^:]*/j[dr][ke]-*[1-9/][^:]*%%g'):$JRE_HOME/bin; } export LD_LIBRARY_PATH=$(echo ${LD_LIBRARY_PATH} | sed 's%:[^:]*/j[dr][ke]-*[1-9/][^:]*%%g'):$JRE_HOME/lib/i386:$JRE_HOME/lib/i386/client } unset JAVADIR # Deactivate possible jdk profile to avoid conflict. if test -s /etc/profile.d/jdk{ mv -f /etc/profile.d/jdk /etc/profile.d/.jdk-superceded_by_profile_java.txt touch /etc/profile.d/jdk sync } # Deactivate possible CLASSPATH and remove old 'java' profile, to avoid conflict. if test -f /etc/profile.d/java{ rm -f /etc/profile.d/java test $CLASSPATH && export CLASSPATH='' }