Last active
August 29, 2015 14:21
-
-
Save jinahya/6ab14f81704907754e88 to your computer and use it in GitHub Desktop.
selecting jdk and changing java_home
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# finds and export JAVA_HOME | |
#export JAVA_HOME=$(dirname $(dirname $(readlink -e /usr/bin/javac))) | |
export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -ne 1 ] | |
then | |
echo please provide the jname. | |
update-java-alternatives -l | |
return; | |
fi | |
jname=$1 | |
sudo update-java-alternatives -s $jname | |
. ~/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#jdk=$(readlink -f ./jdk) | |
#echo jdk: $jdk | |
#. $jdk java-7-oracle | |
. $(dirname "$BASH_SOURCE")/jdk java-7-oracle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#jdk=$(readlink -f ./jdk) | |
#echo jdk: $jdk | |
#. $jdk java-8-oracle | |
. $(dirname "$BASH_SOURCE")/jdk java-8-oracle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment