2013年2月2日 星期六

How to update java runtime environment (JRE) for Chrome browser on Ubuntu

Download jre-7u13-linux-i586.tar.gz from http://www.java.com/zh_TW/download/manual.jsp?locale=zh_TW

$ tar zxvf jre-7u13-linux-i586.tar.gz

Then we get jre1.7.0_13/

$ sudo mv jre1.7.0_13 /usr/share/java/

Now your java is in the right directory, but you need to tell Chrome where to find it. You can start Chrome and type "chrome://plugins" to see where the java plugin is located, in my case it is "/opt/google/chrome/plugins/libnpjp2.so"

$ cd /opt/google/chrome/plugins
$ ls -l libnpjp2.so
lrwxrwxrwx 1 root root   48 2013-02-02 18:14 libnpjp2.so -> /usr/share/java/jre1.6.0_24/lib/i386/libnpjp2.so*

Now you see it's linked to the old one, change it

$ ln -s -f /usr/share/java/jre1.7.0_13/lib/i386/libnpjp2.so

Done.

沒有留言: