Re: How to undo Java installation and settings
On Saturday 03 January 2015 22:12:55 Dalios wrote: I am wondering if I should just uninstall every package with java or jre in its name and then just re-install one of the open-jdk or icedtea packages and let apt do its magic... I'd be tempted! Lisi -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/201501041616.48199.lisi.re...@gmail.com
Re: How to undo Java installation and settings
On 01/03/2015 05:12 PM, Dalios wrote: On 01/03/2015 08:31 PM, Ric Moore wrote: On 01/03/2015 03:06 AM, Dalios wrote: Hello all, 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). It would have been far easier to use synaptic, then check the java packages that you wanted and let it install them. A couple of minutes later and you would have been done. Now I want to uninstall Java and undo all settings to go were I was before all this got started. It would have been just as easy to uninstall the packages with synaptic. But, since you opted to do all of those alternatives links by hand, you'll have to delete them yourself. What webpage provided these instructions? :) Ric According to the info I found on the Debian wiki the package is not there to be installed with Synaptic: Sun Java is no longer available in the repositories (wiki.debian.org/Java/Sun). That is correct. But the regular ole icedtea package and openjdk are in the repos, since they are legit to have. I can't find the how-to that I followed to do the installation (when I wrote the first mail this morning I thought that it was from the Debian wiki but since I can't find it I assume that it is from a Debian user forum or from a Debian derivative forum or something similar). Anyway I purged the packages that were installed and I removed the (symbolic) links that were created with the ln command. But there are some commands that I don't know how to undo and if it is even necessary. These commands are: snippage If you want Oracle Java then the easiest way to do it is to use the Oracle Java Installer from: http://www.webupd8.org/2012/06/how-to-install-oracle-java-7-in-debian.html It is swt! And, it correctly sets all of the alternatives and adds some you might not ever heard of. It is complete, works flawlessly every time I've used it for the last several years. Plus, it updates automagically when needed, the Debian way. What is installed is just a script (that is the legal part for Debian) and it handles downloading Oracle Java 7, installing it in /usr/lib/jvm where it should be, and then setting up alternatives. The guy that did this is sharp! He also has a Java 8 version, which I tried, but I settled back on 7. Enjoy! Ric -- My father, Victor Moore (Vic) used to say: There are two Great Sins in the world... ..the Sin of Ignorance, and the Sin of Stupidity. Only the former may be overcome. R.I.P. Dad. Linux user# 44256 -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/54a9b9c9.4010...@gmail.com
Re: How to undo Java installation and settings
(The previous message had something wrong regarding its font settings as well as a wrong subject line; so I am sending this again) Hello all, 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). 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. I paste here the relevant commands from my bash history (for root and for my user): -88--8 root@debian:/home/jcb# history apt-get install default-jre aptitude search jdk apt-get install default-jre aptitude search java aptitude install java-package make-jpkg /home/jcb/Downloads/jre-8u25-linux-i586.tar.gz aptitude search jre 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 ln -s /usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/IcedTeaPlugin.so mozilla-javaplugin.so ls -la /usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/ cd /etc/alternatives ln -s /usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/IcedTeaPlugin.so mozilla-javaplugin.so ls -la mozilla-javaplugin.so cd /usr/lib/mozilla/plugins/ ln -s /etc/alternatives/mozilla-javaplugin.so mozilla-javaplugin.so ls -la mozilla-javaplugin.so ln -s /etc/alternatives/mozilla-javaplugin.so mozilla-javaplugin.so cd /home/jcb/Downloads/ mv /home/jcb/Downloads/jdk1.8.0_25 /opt cd /opt/ update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_25/bin/java 1 update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_25/bin/javac 1 update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.8.0_25/jre/lib/i386/libnpjp2.so update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.8.0_25/jre/lib/i386/libnpjp2.so 1 update-alternatives --set java /opt/jdk1.8.0_25/bin/java pdate-alternatives --set javac /opt/jdk1.8.0_25/bin/javac update-alternatives --set javac /opt/jdk1.8.0_25/bin/javac update-alternatives --set mozilla-javaplugin.so /opt/jdk1.8.0_25/jre/lib/i386/libnpjp2.so java -version jcb@debian:~$ history aptitude search jdk su fakeroot make-jpkg /home/jcb/Downloads/jre-8u25-linux-i586.tar.gz -88--8 Thanks in advance Dalios -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/54a7a8e1.8030...@eumx.net
Re: How to undo Java installation and settings
On 01/03/2015 08:31 PM, Ric Moore wrote: On 01/03/2015 03:06 AM, Dalios wrote: Hello all, 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). It would have been far easier to use synaptic, then check the java packages that you wanted and let it install them. A couple of minutes later and you would have been done. Now I want to uninstall Java and undo all settings to go were I was before all this got started. It would have been just as easy to uninstall the packages with synaptic. But, since you opted to do all of those alternatives links by hand, you'll have to delete them yourself. What webpage provided these instructions? :) Ric According to the info I found on the Debian wiki the package is not there to be installed with Synaptic: Sun Java is no longer available in the repositories (wiki.debian.org/Java/Sun). I can't find the how-to that I followed to do the installation (when I wrote the first mail this morning I thought that it was from the Debian wiki but since I can't find it I assume that it is from a Debian user forum or from a Debian derivative forum or something similar). Anyway I purged the packages that were installed and I removed the (symbolic) links that were created with the ln command. But there are some commands that I don't know how to undo and if it is even necessary. These commands are: 8-8--8 update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_25/bin/java 1 update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_25/bin/javac 1 update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.8.0_25/jre/lib/i386/libnpjp2.so update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.8.0_25/jre/lib/i386/libnpjp2.so 1 update-alternatives --set java /opt/jdk1.8.0_25/bin/java update-alternatives --set javac /opt/jdk1.8.0_25/bin/javac update-alternatives --set javac /opt/jdk1.8.0_25/bin/javac update-alternatives --set mozilla-javaplugin.so /opt/jdk1.8.0_25/jre/lib/i386/libnpjp2.so 8-8--8 I am wondering if I should just uninstall every package with java or jre in its name and then just re-install one of the open-jdk or icedtea packages and let apt do its magic... Regards, Dalios -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/54a86967.2060...@eumx.net
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 signature.asc Description: Digital signature