1. download source tarball from java site (32bit)
2. remove all openjdk packages (via synaptic package manager)
3. create a temp dir and untar the downloaded file
4. (as root) mv the jre1.7.0 directory to /usr/lib/jvm/
5. (as root) do a updatedb on the system
6. get this script, (webupd8.googlecode.com/files/update-java-0.5b) and edit it
6.a substitute all gksudo words with sudo
6.a.1 (note) you can do it in a easier fashion, by running this command on the shell:
cat update-java-0.5b | sed ‘s/gksudo/sudo/g’ > update-java.05c
6.a.2 (note) this will create a new script file, with the needed changes.
7. do a chmod +x update-java.05c, in order to be able to run the script after.
8. (run) sudo update-java.05c
8.a a screen will popup, asking you which java version to delete, just press cancel.
8.b a 2nd screen will appear, asking you which version of java to “install”, choose jre1.7.0 and press ok.
9. it will print some odd GTK errors (cosmetic), and finish :)
10. erase the tarball you’ve downloaded from java. et voila! ;0)
OPTIONAL Java Plugin for Mozilla/Chromium
1. remove the old plugins from the sistem.
1.a (run) rm -f ~/.mozilla/plugins/libnpjp2.so ~/.mozilla/plugins/libjavaplugin_oji.so
1.b (run as root) sudo rm -f /usr/lib/firefox/plugins/libnpjp2.so /usr/lib/firefox/plugins/libjavaplugin_oji.so
2. create simbolic links for the new java plugins
2.a (run) mkdir -p ~/.mozilla/plugins && cd ~/.mozilla/plugins && ln -s /usr/lib/jvm/jre1.7.0/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/ && ln -s /usr/lib/jvm/jre1.7.0/jre/lib/i386/libjavaplugin_oji.so /usr/lib/firefox/plugins/
2.b (run as root) sudo ln -s /usr/lib/jvm/jre1.7.0/jre/lib/i386/libnpjp2.so /usr/lib/firefox/plugins/ && ln -s /usr/lib/jvm/jre1.7.0/jre/lib/i386/libjavaplugin_oji.so /usr/lib/firefox/plugins/
3. finito/kaput/fim/the end