Saturday, December 6, 2014

Install Java8 in Ubuntu

Install Java8 in Ubuntu

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
If it throws error: dpkg: error processing /var/cache/apt/archives/oracle-java7-installer_7u25-0~webupd8~1_all.deb (--unpack):
 trying to overwrite '/usr/share/applications/JB-java.desktop', which is also in package oracle-java6-installer 6u37-0~eugenesan~precise1
Errors were encountered while processing:
 /var/cache/apt/archives/oracle-java8-installer_7u25-0~webupd8~1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
apt-get install whatever
java -version