[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to undo Java installation and settings



Dalios wrote:
> a few days ago I had to install Java in a laptop in order for a web
> application to be able to function properly. I followed directions
> found in the internet (mostly the debian wiki and the Adobe
> download page).

For Java all you need to do is to install one of the Java packages.
In the old days sun-java6-jre was common.  These days Oracle has
pretty much killed off all of the old Sun software.  So these days it
is simply OpenJDK packages.  Which you know because you were
installing them.

> aptitude install openjdk-7-jre

That should have been enough.  What about it wasn't enough for you?

> ln -s /etc/alternatives/mozilla-javaplugin.so > mozilla-javaplugin.so

This creates a zero sized file mozilla-javaplugin.so due to the shell
redirection that happens before the ln command starts and then the ln
command symlinks mozilla-javaplugin.so to the current directory, which
happens to be on top of the newly created file.  If that was in a wiki
anywhere please delete it.  It is completely bogus.

Fortunately you were in your home directory and so instead of doing
anything really bad it just left junk behind.  You might want to
remove the files to clean up.

The expected syntax would be:

  ln -s /etc/alternatives/mozilla-javaplugin.so mozilla-javaplugin.so

Or:

  ln -s /etc/alternatives/mozilla-javaplugin.so .

> Now I want to uninstall Java and undo all settings
> to go were I was before all this got started. The installed system
> is a (rather stock) Debian 7 Wheezy LXDE.

Simply purge all of the packages you installed.

> aptitude install openjdk-7-jre
> aptitude install openjdk-7-jre-lib
> aptitude install icedtea-7-plugin
> aptitude uninstall openjdk-7-jre
> aptitude purge openjdk-7-jre
> aptitude install openjdk-7-jre-lib icedtea-7-plugin

For the above simply purge those.  I use apt-get but aptitude is fine.

  dpkg -l | grep openjdk

What does that show?  Purge all of them.
 
  aptitude purge openjdk-7-jre openjdk-7-jre-lib icedtea-7-plugin

That will take care of all of the package alternatives.  If you
created any additional files or symlinks you will need to remove those
manually.  It was hard to follow your history.

> cd /etc/alternatives
> ln -s /usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/IcedTeaPlugin.so >& mozilla-javaplugin.so

  rm /etc/alternatives/IcedTeaPlugin.so
  rm /etc/alternatives/mozilla-javaplugin.so

> cd /usr/lib/mozilla/plugins/
> ln -s /etc/alternatives/mozilla-javaplugin.so > mozilla-javaplugin.so
> ln -s /etc/alternatives/mozilla-javaplugin.so mozilla-javaplugin.so

  rm /usr/lib/mozilla/plugins/mozilla-javaplugin.so

You may want to clean up anything left behind manually.

  find /etc -name '*java*'

Good luck!
Bob

Attachment: signature.asc
Description: Digital signature


Reply to: