Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Programming»JAVA»How to Install Java 9 on Debian 9/8 via PPA

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

    RahulBy RahulFebruary 4, 20162 Mins ReadUpdated: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

    Java java 9 java on debian JDK 9 JRE 9
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow To Add and Delete User in Ubuntu, Debian & LinuxMint
    Next Article How to Install Nginx, PHP 7 & MySQL on Ubuntu 16.04, 14.04

    Related Posts

    How to Install JAVA on Ubuntu 22.04

    Updated:May 16, 20224 Mins Read

    Java HashMap – How to Get Value from Key

    Updated:April 6, 20222 Mins Read

    Java HashMap – How to Get Key from Value

    Updated:April 6, 20222 Mins Read

    5 Methods to Print an Array in Java

    Updated:April 21, 20222 Mins Read

    How To Install Java on Debian 11

    4 Mins Read

    How to Install Tomcat 10 on Ubuntu 20.04

    Updated:February 18, 20226 Mins Read

    1 Comment

    1. Ruben Dario Herrera on November 13, 2017 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

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Install Sublime Text 4 on Ubuntu 22.04
    • How to Enable / disable Firewall in Windows
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.