How To Install Oracle Java 7/8 On Fedora And CentOS
Java is somewhat one of the most important applications on your system and not having java can bring nightmares. It is suggested to users that after installing the operating system on your computer you should install java on it.
Here is a tutorial to install Oracle Java (JDK 7/8) on Fedora and CentOS.
If you want to install Java on Ubuntu , you can find atutorialhere.How To Install Oracle Java On Fedora And CentOS? Oracle JAVA 8 is a stable release and available to download and install on officialdownload page
Firstly you will have to download the packages for installing Java on your system. You can find the JDK 7 here / JRE 7 here and JDK 8 here / JRE 8 here . These packages will be in rpm form ( .rpm ) and you will have to check the architecture as well i.e 32 bit or 64 bit.
While downloading you will have to accept the License Agreement to download.
The installation will be done using following commands -Steps to install Java: Step 1: First step is to change to root user
This is to provide appropriate permissions so as to install the packages.sudo -i
Step 2: Next step is to install the JDK.
While installing firstly check which version of Java you want to install i.e Oracle Java 7 or 8.
Also, you will have to keep in mind to choose packages according to the system architecture, the packages will have to be downloaded keeping a check on it.
“rpm -Uvh /path/jdk-version-linux-architecture.rpm”Eg
“rpm -Uvh /home/user/Downloads/jdk-8u111-linux-x64.rpm”Steps for Oracle Java JDK 7 (32 bit)
Steps for Oracle Java JDK 7 (64 bit)
Steps for Oracle Java JDK 8 (32 bit)
Steps for Oracle Java JDK 8 (64 bit)
Step3: After installing Jdk we have to install Jre
Eg“rpm -Uvh /home/user/Downloads/jre-8u111-linux-x64.rpm”
“rpm -Uvh /path/jre-version-linux-architecture.rpm”
Steps for Oracle Java JRE 7 (32 bit)
Steps for Oracle Java JRE 7 (64 bit)
Steps for Oracle Java JRE 8 (32 bit)
Steps for Oracle Java JRE 8 (64 bit)
Now Java is installed on your systemStep 4:Check java version “java -version”
Step 5: Lastly we have to configure the alternatives. Alternatives are configured to make the newer version of java which you have installed as the default program for running java sudo alternatives --install (old path) java (new path)
Enjoy the power of Java on your system.
For any assistance or problem ask me in the comment box.
本文系统（linux）相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统
本文标题：How To Install Oracle Java 7/8 On Fedora And CentOS