I just completly shifted to Ubuntu from Windows 7. I am a java developer and now I need to install Java 8 JDK and JRE. I installed 64 bit ubuntu 14.04.02 and it seems like there are lot of ways to install the Oracle Java JDK, but I am not understanding any of it properly (mostly because the tutorials are outdated!).
Now, the easiest way I found is in here –http://tecadmin.net/install-oracle-java-8-jdk-8-ubuntu-via-ppa/
But I am not sure whether this is a good idea to install via a PPA because it is coming from a third party source.
I didn't monitor any step by step guide on askubuntu about installing the Java JDK 8. Can someone help me with that please? Just installing is not enough, setting up the environment variables also mandatory.
Anyway, if the PPA is the recommended best way, please let me know that too.
Best Answer
Actually all these PPAs are from third parties. Oracle does not provide any PPA, and the manual way of installing Oracle JDK 8 is explained in step by step manner in this article : Install Latest Oracle JDK in Ubuntu
Step 1: Download the latest JDK(jdk-Xuxx-linux-xXX.tar.gz) from this official link.
Step 2: Open the terminal (Ctrl + Alt + T) and enter the following command.
Step 3: Enter the following command to change the directory.
Step 4: Extract the jdk-Xuxx-linux-xXX.tar.gz file in that directory using this command.
Step 5: Enter the following command to open the environment variables file.
Step 6: In the opened file, add the following bin folders to the existing PATH variable.
The PATH variables have to be separated by colon. Notice that the installed JDK version is 1.8 update 45. Depending on your JDK version, the paths can be different. Add the following environment variables at the end of the file.
The environment file before the modification:
The environment file after the modification: