Installing Oracle Java 8 in Ubuntu


In an earlier post I talked about installing java in fedora 20. In this post I am going to do the same with Ubuntu. As you know Ubuntu is an Apt based repositories to install softwares. so its farely easy if you have the software in one of the Ubuntu pre-configured repository. But unfortunately Oracle java 8 is not included in one of those, Hence we will have to either download the same from java website and configure all by ourselves or use a third party repository for the same. Here i will talk about the easiest way, that is adding a third party repository from WebUpd8 team. WebUpd8 doest keep the java binaries in their server, they just provide a script that can download and install Oracle Java 8. So let us begin.

Open the Terminal and type as follows.

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

and follow the on screen instructions.

thats it, you have installed java 8. happy coding

Installing Java8 in Fedora 20

Java8 is the latest SDK for Developing Java Applications. For information about java8, please visit the oracle java8 page. In this post, i will show how to install java8 in Fedora 20.

Step1: Download Java8

Java8 can be downloaded from Oracle Java8 Page. As of writing, The latest version available is Java8 update 11. Download the rpm file as per your architecture. I downloaded jdk-8u11-linux-x64.rpm as i have 64 bit Fedora installed in my computer. Please change the file name as per the file you are downloading.

After downloading, please open terminal and type the following command.

sudo -i

rpm -Uvh  /path_to_rpm/jdk-8u11-linux-x64.rpm

This will install java in your computer. now we need to create link to the executable using the alternatives command. the commands format is

alternatives [options] –install link name path priority [–slave link name path]… [–initscript service]

the priority option will set the priority of the link if more than one version is installed. since i have java 8 version 1.8.0_11 i am setting the priority as 18011, but check your computer to determine if any other version is set wih higher priority number. the higher the number, the higher the priority is. so we don’t want to set the latest version in a lower priority. to check the priority, type the following command in terminal.

alternatives --display java

since i don’t have a more priority version found, i am sticking wth the number 18011.

Enter the following in terminal.

alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 18011
alternatives --install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 18011
## Browser Plugin 32-bit ##
alternatives --install /usr/lib/mozilla/plugins/ /usr/java/latest/jre/lib/i386/ 18011
## Browser Plugin 64-bit ##
alternatives --install /usr/lib64/mozilla/plugins/ /usr/java/latest/jre/lib/amd64/ 18011
alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 18011
alternatives --install /usr/bin/jar jar /usr/java/latest/bin/jar 18011

This will complete the installation, happy coding…

Installing Flash Player in Fedora 20

Adobe Flash Player is an essential utility that we cannot avoid in our daily computer activities. whether it is a Desktop/Laptop or Smartphone/Tablet we cannot avoid it. It helps us play multimedia content over web browsers. In order to run some websites we need this plugin to be installed in our computer. some websites like youtube may not provide you better experiance if you have not installed it. So here is how we install it in Fedora 20.

Step 1 : Install Adobe Yum Repository

Adobe repository contains the installation / updation files for Adobe Flash Player and other plugins and softwares. run the below command in your terminal to install the Adobe Yum Repository in your computer.

For 32 Bit Fedora 20

sudo -i
rpm -ivh
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux


For 64Bit Fedora 20

sudo -i
rpm -ivh
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux

Step 2 : Install Adobe Flash Player in Fedora 20

yum install flash-plugin nspluginwrapper alsa-plugins-pulseaudio libcurl

Thats it. The installation is complete.