Monday, October 27, 2014

How to uninstall default open jdk in Oracle Linux

When you install linux OS on either virtual machines or physical machines then it comes with open jdk version 1.6 or 1.7 or both (In my case both on oracle linux 6.5). Well this is not a problem but sometimes you required to install the products (OSB, SOA, Weblogic etc.) which is certified with different jdk vendor or version. In that case you are required to remove the open jdk and install the jdk version you required (although you can install the new jdk version without removing older one i.e. you need to set the environment variable JAVA_HOME which is pointing to new jdk).

Here are the steps:

Check JDK installation

Run the command: java -version

Removing JDK

Run the command: yum remove java*

This command will search for all the java version and will show you all the available jdk version and ask for permission if you want to remove Y/N.

Enter 'y' to remove the jdk. After that verify jdk by running the command "java -version", you will get the following out put : bash: /usr/bin/java: No such file or directory

Install the new JDK Version

Go to the following link for how to install jdk on linux

No comments:

Post a Comment