This tutorial will show how to install Java 9 on Ubuntu and validate the setup to make sure the necessary environment variables for development are set.
In Ubuntu terminal, add the repository where Java 9 installation packages can be found. It’s the same repository where you can find the Java 8 installation packages:
sudo add-apt-repository ppa:webupd8team/java
Update the packages list with the newly added repository and install the Java 9:
sudo apt-get update sudo apt-get install oracle-java9-installer
Note that the download may take a while since the Java 9 installer is considerably bigger than the previous versions.
Additionally, during the installation process, you must confirm the Java 9 download and accept the licence agreement. After the confirmations, wait until the installation process is complete.
The installation through the above steps often automatically performs the necessary changes on the environment for Java development on Ubuntu, so unlike Windows, you shouldn’t need to manually set up any environment variables.
So, let’s validate the installation with the following commands:
java -version java version "9" Java(TM) SE Runtime Environment (build 9+181) Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)
javac -version javac 9
I hope it helps.
Cya!
This guide will show you how to create a Python function decorator with a few…
This guide will show you how to fix the error Got permission denied while trying…
This guide will show you how to create a Python virtual environment on Intellij IDEA…
This tutorial will quickly show you how to to find and kill processes on Linux,…
This guide shows a possible solution for Python error Relocation R_X86_64_PC32 against symbol can not…
I condensed below a cheat sheet of Kubernetes useful commands. I will keep updating this…