Desinstala e reinstala completamente o OpenJDK

7

Eu pesquisei askubuntu e tentei as sugestões, mas falhei. Eu tentei esta pergunta: Como desinstalar completamente o Java?

1.Eu corro sudo apt-cache search openjdk obtenho o seguinte:

openjdk-6-dbg - Java runtime based on OpenJDK (debugging symbols) openjdk-6-demo - Java runtime based on OpenJDK (demos and examples) openjdk-6-doc - OpenJDK Development Kit (JDK) documentation openjdk-6-jdk - OpenJDK Development Kit (JDK) openjdk-6-jre - OpenJDK Java runtime, using Hotspot JIT openjdk-6-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless) openjdk-6-jre-lib - OpenJDK Java runtime (architecture independent libraries) openjdk-6-source - OpenJDK Development Kit (JDK) source files icedtea-7-jre-jamvm - Alternative JVM for OpenJDK, using JamVM openjdk-6-jre-zero - Alternative JVM for OpenJDK, using Zero/Shark openjdk-7-dbg - Java runtime based on OpenJDK (debugging symbols) openjdk-7-demo - Java runtime based on OpenJDK (demos and examples) openjdk-7-doc - OpenJDK Development Kit (JDK) documentation openjdk-7-jdk - OpenJDK Development Kit (JDK) openjdk-7-jre - OpenJDK Java runtime, using Hotspot JIT openjdk-7-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless) openjdk-7-jre-lib - OpenJDK Java runtime (architecture independent libraries) openjdk-7-jre-zero - Alternative JVM for OpenJDK, using Zero/Shark openjdk-7-source - OpenJDK Development Kit (JDK) source files

2. execute sudo apt-get remove openjdk obtenha o seguinte: Reading package lists... Done Building dependency tree
Reading state information... Done Package openjdk-7-jdk is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 182 not upgraded.

    
por janwen 20.05.2012 / 10:17

2 respostas

11

Você não pode remover o OpenJDK 7 porque não está instalado . Se você estiver tentando remover o OpenJDK 6, tente sudo apt-get remove openjdk-6-jdk ou sudo apt-get remove default-jdk .

apt-cache search mostra apenas os pacotes disponíveis, não os pacotes que você instalou. Para isso, tente sudo dpkg --list ; sudo dpkg --list | grep -i jdk mostrará todos os pacotes relacionados ao JDK instalados em seu sistema.

    
por ish 20.05.2012 / 10:22
3

Execute este comando, que permite escolher qual instalação Java será o padrão:

sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                           Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java   1061      auto mode
  1            /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java   1061      manual mode
  2            /usr/lib/jvm/java-7-oracle/jre/bin/java         1         manual mode
    
por Faizal Pribadi 15.02.2013 / 16:25