Custom Search

Thursday, April 25, 2019

How to Install Oracle Java JDK 12 in Ubuntu 19.04 18.04, Debian, Linux Mint

$ wget --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.1+12/69cfe15208a647278a19ef0990eea691/jdk-12.0.1_linux-x64_bin.tar.gz

$ sudo mkdir /opt/jdk

$ sudo tar -xzf jdk-12.0.1_linux-x64_bin.tar.gz -C /opt/jdk/

$ sudo update-alternatives --install /usr/bin/java java /opt/jdk/jdk-12.0.1/bin/java 100

$ sudo update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk-12.0.1/bin/javac 100

$ update-alternatives --display java

$ update-alternatives --display javac

$ java -version
java version "12.0.1" 2019-04-16
Java(TM) SE Runtime Environment (build 12.0.1+12)
Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)

No comments:

Post a Comment