2013年10月9日 星期三

How to install Java plugin for chrome & firefox in ubuntu?

只是自己的一些筆記....人老了...總是設過就忘了...Orz
寫下來,  以後比較好找...(明明就是懶的再爬一次文...XD)


Test if java is working with your browser already.
http://www.java.com/zh_TW/download/testjava.jsp

If it is not working, you have to install & enable it.

Installation:

1. download Java from java website.
http://www.java.com/zh_TW/download/

2. untar the tarball (I untar it to /usr/java.)
# sudo mkdir -p /usr/java
# cd /usr/java
# sudo tar vzxf jre-7u40-linux-i586.tar.gz



Enabling:

Chrome:

1. create the symbolic link for chrome.
# sudo mkdir /opt/google/chrome/plugins
# cd /opt/google/chrome/plugins
# sudo ln -s /usr/java/jre1.7.0_40/lib/i386/libnpjp2.so

2. close all chrome windows/pages, and re-open it .
check if java plugin is enabled in chrome.
open "chrome://plugins/" in chrome.

open "http://www.java.com/zh_TW/download/testjava.jsp" to check if the java is working in chrome.

Firefox:

1. create the symbolic link for firefox
# cd /usr/lib/mozilla/plugins
# sudo ln -s /usr/java/jre1.7.0_40/lib/i386/libnpjp2.so

2. close all firefox windows/pages and re-open it.
check if java plugin is enabled in firefox.
工具->附加元件->外掛程式

open "http://www.java.com/zh_TW/download/testjava.jsp" to check if the java is working in firefox.



note: the official guide from java website: http://www.java.com/zh_TW/download/help/enable_browser_ubuntu.xml