Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Programming»JAVA»How to Install Java 8 on Debian 10/9/8 via PPA

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

    By RahulMay 2, 20192 Mins Read

    How do I Install Java 8 on Debian?. The first Oracle Java 8 stable version was released on Mar 18, 2014, and available to download and install. Oracle Java PPA for Debian systems is being maintained by Webupd8 Team. JAVA 8 is released with many of new features and security updates. This tutorial will help you to Install Java 8 on Debian 9/8/7 systems using PPA and apt-get command.

    Advertisement

    The Ubuntu and LinuxMint users use below link to install Java 8 on their system.

    IMPORTANT: Java 8 is no longer available to download publically. You can use below link to install Java 11.

    • Read this => Install Java 11 on Debian 9 (Stretch)
    • Read this => Install Java 11 on Debian 10 (Buster)

    Step 1 – Add Java 8 PPA

    The webupd8 team has built a Java installer package for Debian systems. You need to add that PPA repository to your system for installing Java 8 on Debian.

    Create a new Apt configuration file /etc/apt/sources.list.d/java-8-debian.list, and edit in text editor.

    sudo vim /etc/apt/sources.list.d/java-8-debian.list
    

    and add following content in it.

    deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
    deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty 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 8 on Debian

    You are all set to start Java installation on Debian. Run the following commands to update apt-cache and then install Java 8 on Debian system using the apt-get package manager.

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

    The installer will prompt for accept Oracle terms in order to continue Java installation on Debian. Accept the terms and complete setup.

    Step 3 – Verify Java Installation

    Finally, you have successfully installed Oracle Java on your Debian system. Let’s use the following command to verify installed version of Java on your system.

    java -version
    
    java version "1.8.0_201"
    Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
    Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
    
    

    Step 4 – Setup Java Environment

    The Webupd8 PPA repository also provides a package to set environment variables, Install this package using the following command.

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

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

    install java on debian Java java 8
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Mastering Environment Variables in Java: A Comprehensive Guide

    Encapsulation in JAVA (With Example)

    Top Code Formatting Tips for Java Developers

    View 27 Comments

    27 Comments

    1. anyBody on January 14, 2021 8:27 pm

      Don’t work….

      Reply
    2. Ben on May 5, 2020 5:57 pm

      umm…

      W: GPG error: http://ppa.launchpad.net/webupd8team/java/ubuntu trusty InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY C2518248EEA14886
      E: The repository ‘http://ppa.launchpad.net/webupd8team/java/ubuntu trusty InRelease’ is not signed.
      N: Updating from such a repository can’t be done securely, and is therefore disabled by default.

      I did exactly as you said and looks like it isn’t much use?…

      Reply
    3. Leutech on October 22, 2019 11:41 am

      For all other guys wo see this. If you have debian 8/9/10. On Debian 8 and 9 you can run “apt install openjdk-8-jdk” and for Debian 10 (Buster), if you want the java 8 version add this in the sources.list file in /etc/apt:

      deb “http://ftp.debian.org/debian” stretch main
      deb-src ” http://ftp.de.debian.org/debian” stretch main

      after you add these 2 lines in the sources.list file you have to update with “apt update” and after that you can run “apt install openjdk-8-jdk”. After the installation of java i recommended to delete the 2 lines from the source.list file and update again and now all would be fine

      Reply
      • amanwithnoplan on May 6, 2020 3:45 am

        THANK YOU, I was working at this for like 5 HOURS, it took me so long to realize it was Debian 10 and not 9 but if I didn’t see this I would’ve given up THANK YOU!

        Reply
    4. dima on October 20, 2019 7:51 pm

      wow!

      Reply
    5. sandeep on April 29, 2019 5:24 am

      seems launchpad has removed the orcale java 8

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

      How can I install the orcale java 8 on debian? any ideas is there any other repositories?

      Reply
    6. Tom on April 2, 2019 4:49 pm

      Under my current OS release, the command to update the key store is

      sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys EEA14886

      Reply
    7. Jose on October 22, 2018 2:35 am

      Thanks eclipse Neon.3 start to run again!

      Reply
    8. Slappy on July 16, 2018 12:24 am

      I am running Raspian Stretch Lite and when I attempt to hit the import of the key it fails with:

      “[email protected]:~ $ sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys EEA14886
      Executing: /tmp/apt-key-gpghome.l6hy3eHIwG/gpg.1.sh –keyserver keyserver.ubuntu.com –recv-keys EEA14886
      gpg: failed to start the dirmngr ‘/usr/bin/dirmngr’: No such file or directory
      gpg: connecting dirmngr at ‘/tmp/apt-key-gpghome.l6hy3eHIwG/S.dirmngr’ failed: No such file or directory
      gpg: keyserver receive failed: No dirmngr”

      I also tried instead doing the Java 9 and it fails at the key import as well. What am I doing wrong?

      Reply
      • Rahul K. on July 17, 2018 4:28 am

        Please install before this:

        sudo apt-get install dirmngr

        Reply
    9. Dingus on May 8, 2018 1:13 pm

      Thanks for this, it helped me out

      Reply
    10. yusuf nasoro on January 3, 2018 3:11 pm

      how can I proceed by adding the following content to it?
      deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
      deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main

      cause it stucks there

      Reply
    11. protorp on August 3, 2017 10:41 pm

      Realy thanx) It need me to run DBeaver 4.

      Reply
    12. agalgo on June 14, 2017 1:13 am

      So far so good. Thanks.

      Reply
    13. cesar on May 31, 2017 2:36 am

      Excelent!! Thank

      Reply
    14. Premalatha on April 11, 2017 6:54 am

      Good!!!., Simple and clean

      Reply
    15. yuri on February 27, 2017 9:53 pm

      not work can you help me?
      r[email protected]:/usr/bin# sudo apt-get install oracle-java8-installer
      Lettura elenco dei pacchetti… Fatto
      Generazione albero delle dipendenze
      Lettura informazioni sullo stato… Fatto
      oracle-java8-installer è già alla versione più recente.
      0 aggiornati, 0 installati, 0 da rimuovere e 0 non aggiornati.
      3 non completamente installati o rimossi.
      Dopo quest’operazione, verranno occupati 0 B di spazio su disco.
      Continuare? [S/n] s
      Configurazione di java-common (0.52)…
      mkdir: impossibile creare la directory “/etc/.java/.systemPrefs”: File già esistente
      dpkg: errore nell’elaborare il pacchetto java-common (–configure):
      il sottoprocesso installato script di post-installation ha restituito lo stato di errore 1
      dpkg: problemi con le dipendenze impediscono la configurazione di oracle-java8-installer:
      oracle-java8-installer dipende da java-common (>= 0.24); comunque:
      Il pacchetto java-common non è ancora configurato.

      dpkg: errore nell’elaborare il pacchetto oracle-java8-installer (–configure):
      problemi con le dipendenze – lasciato non configurato
      Configurazione di jdk1.8.0-121 (1.8.0121-1)…
      Error: unpack200 – command could not be found.

      Please refer to the Troubleshooting section of theInstallation Instructions
      on the download page.
      find: “/usr/java/*”: File o directory non esistente
      update-alternatives: errore: il percorso alternativo /usr/java/jdk1.8.0_121/jre/bin/java non esiste
      update-alternatives: errore: il percorso alternativo /usr/java/jdk1.8.0_121/bin/javac non esiste
      dpkg: errore nell’elaborare il pacchetto jdk1.8.0-121 (–configure):
      il sottoprocesso installato script di post-installation ha restituito lo stato di errore 2
      Si sono verificati degli errori nell’elaborazione:
      java-common
      oracle-java8-installer
      jdk1.8.0-121
      E: Sub-process /usr/bin/dpkg returned an error code (1)

      Reply
      • Harish Sharma on March 19, 2017 11:47 am

        Thanks for the article. Saved me some time.

        Reply
    16. Kamal on February 22, 2017 12:26 pm

      thanks from germany

      Reply
    17. Artem on February 6, 2017 6:07 pm

      Thanks a lot! You save my time!

      Reply
    18. cristianzamar on September 2, 2016 4:53 pm

      Thank you very much!! Every step worked perfectly.. I used nano instead of vim.

      Reply
    19. Ryan Cooper on July 18, 2016 8:58 pm

      And I just want to use it to play minecraft… so thank you very much!

      Reply
    20. Grayson on June 6, 2016 6:11 pm

      Thank you very much for this clear explanation. This was very helpful.

      Reply
    21. gabriel on May 6, 2016 1:03 pm

      thank you, install went smooth on Debian 7.8

      Reply
    22. Anand Raj on April 6, 2016 4:40 pm

      Thanks you so much…

      Reply
    23. Eli663 on April 4, 2016 3:21 am

      Instead of vim you could use gedit if you computer does not have vim command.

      Reply
      • Sudhanshu Kumar on May 24, 2018 6:09 am

        apt-get install vim
        You could be able to get VIM

        Else you can use vi editor.

        Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Setting and Getting the Default Timezone in Python
    • What is Media Access Control (MAC) Address?
    • What is Cross-Site Scripting (XSS)?
    • What is Content Security Policy (CSP)?
    • A User’s Guide to Understanding Redirection Operators in Bash
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

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