Last active
August 29, 2015 14:11
-
-
Save rpfilomeno/2dbaebda053051bb7e4e to your computer and use it in GitHub Desktop.
Java Tricks
This file contains hidden or 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
| # cd /opt/ | |
| Check if you are using 32-bit or 64-bit | |
| x86_64 ==> 64-bit kernel | |
| i686 ==> 32-bit kernel | |
| #uname -m | |
| 32-bit: | |
| # wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u71-b14/jdk-7u71-linux-i586.tar.gz" | |
| 64-bit: | |
| # wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u71-b14/jdk-7u71-linux-x64.tar.gz" | |
| Extract the downloaded archive: | |
| # tar -xzf jdk-* | |
| # cd jdk* | |
| Install java: | |
| # alternatives --install /usr/bin/java java /opt/jdk1.7.0_71/bin/java 2 | |
| # alternatives --config java | |
| Confirm installation: | |
| # java -version | |
| # export JAVA_HOME=/opt/jdk1.7.0_71 | |
| # export JRE_HOME=/opt/jdk1.7.0_71/jre | |
| # export PATH=$PATH:/opt/jdk1.7.0_71/bin:/opt/jdk1.7.0_71/jre/bin | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment