Ubuntu Server

Install Oracle Java 12 on Ubuntu

You need to add the PPA. (Surce: “Linux Uprising” team)
Install:

For multiple java versions, install [or uninstall] oracle-java12-set-default package to set [or not] Java 12 as default.
Verify:

Remove it: … use the following command if you need to uninstall it:

[Linux] Enable universe, multiverse and restricted repositories on Ubuntu

Use the following terminal commands to enable universe, multiverse and restricted repositories on your Ubuntu system. It works well on the latest Ubuntu Server 18.04 LTS