Versions
- CentOS 6.5
Note |
After completing this guide, java-openjdk will still be a yum dependency and if not already installed, will be installed later by other packages that have the Java JDK as a dependency. There are Sun compatibility RPMs that can be downloaded to fix this, but the version support is old. For more information, see Sources below. |
Install
- Download the appropriate file (ex: jdk-7u17-linux-x64.tar.gz) JDK from the Oracle website.
Note
replace $JDK_FILENAME with the name of the file 1sudo yum localinstall $JDK_FILENAME1sudo yum localinstall jdk-7u17-linux-x64.tar.gz - Add java as alternative for /usr/bin/java:
Note
Default priority of open-jdk 1.7 is 170055. Replace $PRIORITY below with a number higher than the default priority. 1sudo alternatives --install /usr/bin/java java /usr/java/latest/bin/java $PRIORITY
Configure
- Add JAVA_HOME to environment variables
Verify
|