
We need to set Oracle JDK 9 as the default Java version in our Ubuntu Server.

Save and source the /etc/bash.bashrc file to apply the new changes: source /etc/bash.bashrc Set Oracle JDK 9 as default Java version Open /etc/bash.bashrc file in any text editor like nano, vim or gedit and add the following lines at the end: export JAVA_HOME=/opt/jdk-9.0.1 Next, we need to set JAVA_HOME environment variable and add JAVA_HOME to the PATH variable. Name of the directory should be something like "jdk-9.0.1" (Depends on the version you downloaded).


In the /opt directory, you should see the Java installation directory.
