Linux (UBUNTU) and JAVA

If you like it, share it

Sometime is necessary install JAVA (usually JRE) on Linux because some program request it. First check if is already present the Java on your PC, for do this open TERMINAL and write:
java -version

If Java is not present you must see the message below:
bash: /usr/bin/java: No such file or directory

If you see the message similar to the below:
openjdk version “11.0.11” 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)

means that on you PC is installed a OpenJava version that is not compatible with standard Java.
In this case remove it using the command below:
sudo apt-get purge openjdk*

Now for install Java see the download and instruction here.
Per le istruzioni in Italiano vedere qui.