How to install Java JDK 10 on Ubuntu 18.04 / Ubuntu 16.04

This Post shows How to install Java JDK 10 on Ubuntu 18.04. In order to install Oracle Java JDK 1o On Ubuntu 18.04.

Option 1: Installation Using PPA

To install JDK 10 on Ubuntu  Linux just open the terminal and run these commands

Setting up environment variables (make java 10 default)

We can Verify our installation using following commands:


The same procedure of How to install Java JDK 10 can be followed on Ubuntu 16.04, Linux Mint, Debian and other related Linux systems.

Video Instructions

Partner Sites

  • Thank you
    It’s been weeks of update error messages. Failed/bad remedies, even ubuntu/stack-exchange help just fizzled

  • Alexandra Tiffany Tilbrook

    Whoever runs Codebind, you are a lifesaver! Just like how @transitreport:disqus said, StackExchange/AskUbuntu has given me nothing but dead ends and outdated remedies.

    You gave the best advice (and are the #1 result on DuckDuckGo), so I cannot thank you enough.

    But when I installed the JDK, it already pulled in the oracle-java10-set-default package as a dependency.

    But regardless, thank you a billion!