Project

General

Profile

Actions

Install OracleJdk on Debian » History » Revision 11

« Previous | Revision 11/16 (diff) | Next »
Andreas Kohlbecker, 04/07/2021 04:21 PM


How to install the latest JDK 1.8 from Oracle on Debian Linux

  • Debian version: Wheezy 64 bit
  • Oracle jdk version: 1.8

download (NOTE: Adapt the below to match the latest version!!! See http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html)

wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.tar.gz" -O /tmp/jdk-7-linux-x64.tar.gz --no-check-certificate

Unpack the downloaded JAVA 7 archive in /opt

mkdir /opt/java-oracle
tar -zxf /tmp/jdk-7-linux-x64.tar.gz -C /opt/java-oracle

Set-up Oracle’s JAVA 7 to be used on the system, by using higher priority with update-alternatives (NOTE: Adapt the below to match the latest version !!!)

jhome=/opt/java-oracle/jdk1.7.0
update-alternatives --install /usr/bin/java java ${jhome%*/}/bin/java 2000
update-alternatives --install /usr/bin/javac javac ${jhome%*/}/bin/javac 2000
update-alternatives --install /usr/bin/jconsole jconsole ${jhome%*/}/bin/jconsole 2000

TODO: how to remove java and javac from update-alternatives

Updated by Andreas Kohlbecker about 3 years ago · 11 revisions