First install the appropriate jre for your system – http://java.com/en/download/manual.jsp?locale=en
then – as root:
updatedb
locate libnpjp2.so
for firefox browser:
copy the locate of the file, in my case it was :
/usr/java/jre1.7.0_51/lib/amd64/libnpjp2.so
cd /usr/lib64/mozilla/plugins
ln -s "location of file" .
example:
ln -s /usr/java/jre1.7.0_51/lib/amd64/libnpjp2.so .
for chrome:
cd /opt/google/chrome/
mkdir plugins
cd plugins
ln -s /usr/java/jre1.7.0_51/lib/amd64/libnpjp2.so .
restart both browsers