In this article, we will introduce some methods of using commands to install Java (JRE or JDK) on Ubuntu 16.04.