How to Install Oracle Java 13 in Ubuntu 18.04, 16.04, 19.04

Last updated: October 5, 2019

Oracle Java 13 was released a few weeks ago. Here’s how to easily install it in Ubuntu 14.04, Ubuntu 16.04, Ubuntu 18.04, Linux Mint 18.x, 19.x, and higher.

To check out new features and enhancements in Java 13, see the announcement.

The ‘Linux Uprising’ team has made an installer script that automatically downloads and installs Oracle JDK 13, and sets Java 13 as the default Java version (setting JAVA_HOME, etc.).

1.) Open terminal either via Ctrl+Alt+T keyboard shortcut or by searching for ‘terminal’ from application menu. When it opens, run commands to add the PPA:

sudo add-apt-repository ppa:linuxuprising/java

Type your login password (no asterisk feedback) for sudo prompt and hit Enter to continue.

2.) Then check updates and install the script via 2 commands:

sudo apt-get update

sudo apt-get install oracle-java13-installer

The command will automatically downloads Java 13 source tarball, installs on 64-bit Ubuntu, and also sets it as default.

Check the result via command: java --version

(Optional) You can remove the PPA repository via Software & Updates utility under Other Software tab.

And remove Java 13 if you want via command:

sudo apt-get remove oracle-java13-installer

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via ubuntuhandbook1@gmail.com Buy me a coffee: Buymeacoffee | https://ko-fi.com/ubuntuhandbook1 |

12 responses to How to Install Oracle Java 13 in Ubuntu 18.04, 16.04, 19.04

  1. Thanks!

  2. Hello,
    Thanks for sharing such informative and helpful blog post and you are doing a good job so keep posting such amazing articles

  3. thank you !

  4. Pleas how to check Java installation location and how to set JAVA_HOME

    • Installing the oracle-java13-set-default will set JAVA_HOME. Check it out via command:

      echo $JAVA_HOME
      
      echo $PATH

      And you may run command to list all available java versions and set default:

      sudo update-alternatives --config java
  5. Hi Ji,

    Thank you for this post. It helped me to install jdk 13.

  6. # sudo apt-get install oracle-java13-installer
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    E: Unable to locate package oracle-java13-installer

    installer not working bro..

  7. Thank you very much :D

  8. Leonardo Pimentel March 20, 2020 at 3:13 pm

    Finally a fast and simple way!!
    And guess what, the only that really worked for me
    Thank you a lot!!!