When you only want to run Java programs, then you only need the JRE (Java Runtime Environment). When you also want to develop Java programs, then you need the JDK (Java Development Kit). The installation works for both in the same way. I describe here the installation of the JRE.
Note: When you already installed Java on Plop Linux, then remove the old '/usr/java' directory.
1. Download the tar.gz archive of JRE from the Oracle JRE Website.
2. Extract the archive. Example: tar xfvz jre-8u111-linux-x64.tar.gz
3. Move the extracted directory to '/usr/java'. Example: mv jre1.8.0_111 /usr/java
4. Add Java to your environment variables. Add at the end of your user file '~/.bash_profile' the lines
export JAVA_HOME=/usr/java export PATH=$PATH:/usr/java/bin
5. Logout and login to activate the environment variable.
© 2021 by