Saturday 25 January 2014

Adding Java to several browsers

According to the official Java documentation, since  the Java SE 6 update 10 release , Oracle introduced the a new Java Plug-in designed to work in the following browsers:
  • Internet Explorer 6 and 7 on Windows XP and Vista
  • Firefox 3 and up on Windows XP, Windows Vista, Solaris and Linux

Installation
When you download Java (jdk or jre), you will have a file called libnpjp2.so.
Take into account that in a i386 architecture, its path would be something like
<JDK>/<JRE>/lib/i386/libnpjp2.so

In contrast, in a amd64 architecture, the path would be something like:

<JDK>/<JRE>/lib/amd64/libnpjp2.so 
 
That file have to be located inside the adequate directory of the corresponding browser and that is all.
Here you have the details depending on your browser:

1) Firefox
 * Go to the adequate firefox directory
   a) Find the application's general directory and enter to the plugins subdirectory
       or
   b) Go to the directory from your home ~/.mozilla/plugins

* Create a symbolic link inside plugins where the necessary file libnpjp2.so from java is pointing to that plugins subdirectory.
  ln -s  <JDK>/<JRE>/lib/i386/libnpjp2.so . 
   
* Restart firefox.

2) Chrome
* Go to the adequate directory
      cd /opt/google/chrome/plugins/ 
(if plugins subdirectory does not exist, create it.)

* Create a symbolic link inside plugins where the necessary file libnpjp2.so from java is pointing to that plugins subdirectory.
   ln -s <JDK>/<JRE>/lib/i386/libnpjp2.so .

Note: O Chrome não suporta o Java 7 na plataforma Mac. 


3) Opera
* Go to the adequate directory
      cd /usr/lib/opera/plugins
* Create a symbolic link inside plugins where the necessary file libnpjp2.so from java is pointing to that plugins subdirectory.
   ln -s <JDK>/<JRE>/lib/i386/libnpjp2.so .
 



In order to test if your browser has already java, you can go to:
https://java.com/en/download/installed.jsp
and click in the "Verify Java version" button

That's all, restart your browser and you will have java working properly.

No comments:

Post a Comment