LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Unable to remove java 8 from home(path) (https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-remove-java-8-from-home-path-4175586954/)

sysmicuser 08-13-2016 03:00 AM

Unable to remove java 8 from home(path)
 
No idea how to remove java 8

Code:

[jim@docker1 ~]$ java -version
openjdk version "1.8.0_101"
OpenJDK Runtime Environment (build 1.8.0_101-b13)
OpenJDK 64-Bit Server VM (build 25.101-b13, mixed mode)
[jim@docker1 ~]$

Although I did
Code:

[jim@docker1 ~]$ sudo yum remove java
I dig little further and this is what I see:

Code:

[jim@docker1 ~]$ java -version
openjdk version "1.8.0_101"
OpenJDK Runtime Environment (build 1.8.0_101-b13)
OpenJDK 64-Bit Server VM (build 25.101-b13, mixed mode)
[jim@docker1 ~]$ which java
/usr/bin/java
[jim@docker1 ~]$ ls -l /usr/bin/java
lrwxrwxrwx. 1 root root 22 Aug 13 14:45 /usr/bin/java -> /etc/alternatives/java
[jim@docker1 ~]$ ls -l /etc/alternatives/java
lrwxrwxrwx. 1 root root 73 Aug 13 14:45 /etc/alternatives/java -> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-3.b13.el7_2.x86_64/jre/bin/java
[jim@docker1 ~]$


Please assist me as even I install Java 7 this version overrides thereby I am not able to install Tomcat 8

arizonagroovejet 08-13-2016 04:29 AM

Find out which package is providing java 1.8
Code:

$ rpm -qf --queryformat='%{name}\n' /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-3.b13.el7_2.x86_64/jre/bin/java
then remove that package.

The java package is probably meta package or not actually a package at all and yum is installing whatever package is marked as providing java.

You should provide details of the distribution and version you are using as this will help people to help you.

sysmicuser 08-13-2016 07:58 AM

Thanks for your reply. I actually uninstalled all java packages by quering rpm -qa and then removing each individual package.


All times are GMT -5. The time now is 12:13 AM.