Tuesday, July 29, 2014

Installing Oracle JDK on Debian


Solution provided here is an alternative for using webupd8 installer (most common solution)

This is short tutorial how to install jdk8 on debian wheezy/jessie

Notice

If you have openjdk installed, don't remove it right now. Other packages (mvn, eclipse, ant etc) may depend on this package and may be uninstalled.

Get java package manually 

Download and install make-jpkg (needed to create deb)

Create deb package

  • locate jdk-8u*-linux-x64.tar.gz
  • fakeroot make-jpkg jdk-8u*-linux-x64.tar.gz
  • tea time... (or cofee ;) )

Install deb package

  • sudo dpkg -i oracle-java8-jdk_8u11_amd64.deb

Switch to right java version

  •  sudo update-alternatives --config java
on my system it looks like this:

  Selection    Path                                            Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      auto mode
  1            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      manual mode
  2            /usr/lib/jvm/jdk-8-oracle-x64/jre/bin/java       318       manual mode

just choose the line with oracle java (2 in my case)


No comments:

Post a Comment