LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to completely remove OpenJDK? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-completely-remove-openjdk-4175466217/)

Altiris 06-16-2013 09:08 AM

how to completely remove OpenJDK?
 
I installed openjdk today on Debian 7 and I now want to remove it so I did
Code:

sudo apt-get remove openjdk-7-jre
and it said it was removed however when I do
Code:

dpkg --list | grep -i jdk
I get this in the output:

Code:

ii  icedtea-6-jre-cacao:amd64            6b27-1.12.5-1                      amd64        Alternative JVM for OpenJDK, using Cacao
ii  icedtea-6-jre-jamvm:amd64            6b27-1.12.5-1                      amd64        Alternative JVM for OpenJDK, using JamVM
ii  icedtea-7-jre-cacao:amd64            7u3-2.1.7-1                        amd64        Alternative JVM for OpenJDK, using Cacao
ii  icedtea-7-jre-jamvm:amd64            7u3-2.1.7-1                        amd64        Alternative JVM for OpenJDK, using JamVM
ii  openjdk-6-jre:amd64                  6b27-1.12.5-1                      amd64        OpenJDK Java runtime, using Hotspot JIT
ii  openjdk-6-jre-headless:amd64          6b27-1.12.5-1                      amd64        OpenJDK Java runtime, using Hotspot JIT (headless)
ii  openjdk-6-jre-lib                    6b27-1.12.5-1                      all          OpenJDK Java runtime (architecture independent libraries)
ii  openjdk-7-jre-headless:amd64          7u3-2.1.7-1                        amd64        OpenJDK Java runtime, using Hotspot JIT (headless)
ii  openjdk-7-jre-lib                    7u3-2.1.7-1                        all          OpenJDK Java runtime (architecture independent libraries)


jefro 06-16-2013 03:36 PM

Some help on this page maybe.

https://www.linuxquestions.org/quest...ackage-237772/


May have to do some more drastic steps also. Like stopping any reference to startup services or use force option. In old times you had to manually find out what all was installed and remove one at a time.

Altiris 06-16-2013 09:36 PM

If I just do the apt-get remove openjdk-7-jre, will that be enough to go and install Oracle Java 7 and have it as default? Also a really weird thing, I still have OpenJDK 7 installed however when I type Java - version I get 1.6 rather than 1.7 so do I have OpenJDK 6?

sum1nil 06-19-2013 08:18 PM

java
 
Try 'which java' to see the path. If it is still an openjdk path then try 'apt-get purge openjdkXXX'.

After installing Oracle's JDK make an environmental variable JDK_HOME in .bashhrc or .profile pointing to the Oracle install. Add $JDK_HOME/jre/bin:$JDK_HOME/bin to the front of your PATH.
Good luck.

eklavya 06-20-2013 12:29 AM

Try this, I hope it will help.
http://askubuntu.com/questions/13970...nstall-openjdk
http://stackoverflow.com/questions/1...tely-in-ubuntu


All times are GMT -5. The time now is 06:32 PM.