Anytime with following command in Linux terminal you get to know the version of Java JDK installed
java --version
(1) Oracle Java (oracle-java) (2) Java Open SDK (openjdk)
sudo apt-get install openjdk-default
sudo add-apt-repository ppa:linuxuprising/java
Update the changes
sudo apt-get update
Initiate installer
sudo apt install oracle-java11-installer
Then set the installed version of Java as default
sudo apt install oracle-java11-set-default
Now, running below command can help you check that the installation was successful
java --version
https://novicestuffs.wordpress.com/2017/04/25/how-to-uninstall-java-from-linux/
java --version
Installation
There are two Java deployments available for you install(1) Oracle Java (oracle-java) (2) Java Open SDK (openjdk)
OpenJDK
Most of the linux distributions either come installed with OpenJDK however just in-case if you get it pre-installed, you can run below command to get it easily.sudo apt-get install openjdk-default
Oracle JDK
Add the repository firstsudo add-apt-repository ppa:linuxuprising/java
Update the changes
sudo apt-get update
Initiate installer
sudo apt install oracle-java11-installer
Then set the installed version of Java as default
sudo apt install oracle-java11-set-default
Now, running below command can help you check that the installation was successful
java --version
Uninstallation
Below link has the detailed information:https://novicestuffs.wordpress.com/2017/04/25/how-to-uninstall-java-from-linux/
Comments