• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

How to Install Java 9 on Debian 9/8 via PPA

Written by Rahul, Updated on March 29, 2018

How do I install Java 9 on Debian 9/8. Oracle Java 9 is the latest stable release available to install. The first Oracle Java 9 stable version was released on Sep 21, 2017. This tutorial will help you with the installation of Java 9 on Debian Linux. Follow the instructions below to install Java 9 (JDK and JRE) on Debian system.

The users still want Java 8 on their system can use below tutorial to install Java 8 on Debian machine.

  • Install Java 8 on Debian

Step 1 – Add JAVA 9 PPA

In this tutorial, we need to add webupd8team apt repository on our system. Run the below commands to add Java 9 PPA on your system and go for the Java installation on Debian.

Create a new PPA file and edit in your favorite text editor:

sudo vim /etc/apt/sources.list.d/oracle-java9.list

and add the below content to file and save it

deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main

Now import GPG key on your system for validating packages before installing them.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886

Step 2 – Install Java 9 on Debian

Run the following commands to install Java 9 on a Debian system. The java PPA contains a package oracle-java9-installer, Which doesn’t actually contains Java files. This package contains a script which will download Java archive from its official website and configure on your system.

sudo apt-get update
sudo apt-get install oracle-java9-installer

Step 3 – Verify Java Installation

You have successfully installed Java 9 on your Debian system. Let’s verify installed version of Java on your system using the following command.

java -version

java version "9.0.4"
Java(TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)

Step 4 – Configure Java Environment

In Webupd8 PPA repository also providing a package to set environment variables, Install this package using the following command. This will set the user environment variables for JAVA in your system.

sudo apt-get install oracle-java9-set-default

References:
https://launchpad.net/~webupd8team/+archive/java

Share it!
Share on Facebook
Share on Twitter
Share on LinkedIn
Share on Reddit
Share on Tumblr
Share on Whatsapp
Rahul
Rahul
Connect on Facebook Connect on Twitter

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

1 Comment

  1. Avatar Ruben Dario Herrera Reply
    November 13, 2017 at 6:18 pm

    unicamente una observacion:

    deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main
    deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main

Leave a Reply Cancel reply

Popular Posts

  • How To Install Python 3.9 on Ubuntu 20.04 5
  • How To Install Python 3.9 on Ubuntu 18.04 0
  • How to Use AppImage on Linux (Beginner Guide) 2
  • How to Install Python 3.9 on CentOS/RHEL 7 & Fedora 32/31 0
  • How To Install VNC Server on Ubuntu 20.04 1
© 2013-2020 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy