This command should tell you what is currently providing the Java virtual machine (java
) and the Java compiler (javac
):
file /etc/alternatives/java /etc/alternatives/javac
This assumes the "alternatives" system is working properly, which might not be the case, depending on how Java has been "messed up" in the past. To check this, run:
file `which java javac`
If the alternatives system is working correctly and being used by Java, then you should see:
/usr/bin/java: symbolic link to `/etc/alternatives/java'
/usr/bin/javac: symbolic link to `/etc/alternatives/javac'
Otherwise please edit your question to provide details. Then it should be possible to give a more specific answer.
You can remove openjdk-6
with the Software Center. There are multiple packages associated with it, so you may need to remove more than one packages. (All the `openjdk-6 packages are listed here.)
Or you can use the command-line:
sudo apt-get remove openjdk-6-\* icedtea-6-\*
However, whichever method you use, you may want to check first to see what depends on these packages--you might have software installed that specifically needs version 6. (Probably not, but possibly.)
You can check for this by simulating the removal operation on the command-line:
apt-get -s remove openjdk-6-\* icedtea-6-\*
This will show you the effects of removing those packages, including what other packages would be removed as well. (You'll notice that since this is a simulation, you don't need sudo
.)
If you want to be able to continue using Java content online in your web browser (this is not the same thing as JavaScript), then before you remove any icedtea-6-
or openjdk-6-
packages (except perhaps openjdk-6-jdk
), you should make sure you have icedtea-7-
packages installed corresponding to whatever icedtea-6-
packages are installed.
I was able to solve it. First I had to download all the packages on the link I mentionded Ubuntu Secure Proposed team
I did it using the following commands:
sudo wget https://launchpad.net/~ubuntu-security-proposed/+archive/ubuntu/ppa/+build/5935007/+files/openjdk-7-jre_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb
sudo wget https://launchpad.net/~ubuntu-security-proposed/+archive/ubuntu/ppa/+build/5935007/+files/openjdk-7-jre-zero_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb
sudo wget https://launchpad.net/~ubuntu-security-proposed/+archive/ubuntu/ppa/+build/5935007/+files/openjdk-7-jre-headless_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb
sudo wget https://launchpad.net/~ubuntu-security-proposed/+archive/ubuntu/ppa/+build/5935007/+files/openjdk-7-jdk_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb
Then I tried to install all of then manually on this order:
sudo dpkg -i openjdk-7-jre-zero_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb
sudo dpkg -i openjdk-7-jre-headless_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb
sudo dpkg -i openjdk-7-jre_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb
sudo dpkg -i openjdk-7-jdk_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb
All of above commands will result in dependencies errors, I just ignore then all and run the following command:
sudo apt-get -f install
Everything got installed and it is working fine. It seems that the apt-get -f install
command try to solve previous dependencies errors by itself installing all needed dependencies (not sure though, as I'm not an specialist).
If someone think that this is not the right procedure, please let me know.
Best Answer
Documentation is installed into
/usr/share/doc/PACKAGENAME
.There are a few Documentation Viewers in Ubuntu, to help you find it. They are all web-based, though. So you need to run a local web server, and browse to their endpoints.
Off the top of my head: dhelp, dwww, and doc-central.