Sunday, April 27, 2014

Java on linux and internet brower : chrome / firefox


Install java add on firefox / google chrome
Download
  1. Go to http://java.com and click on the Download button, http://www.java.com/en/download/
Java for Linux Platforms
The instructions below are for installing version Java 7 Update 7 (7u7). If you are installing another version, make sure you change the version number appropriately when you type the commands at the terminal. Example: For Java 6u35 replace 7u7 with 6u35. Note that, as in the preceding example, the version number is sometimes preceded with the letter u, and sometimes it is preceded with an underbar, for example, jre1.7.0_07.

  1. Change to the directory in which you want to install. Type:
    cd <directory path name>
    For example, to install the software in the /usr/java/ directory, Type:
    cd /usr/java/

    Note about root access: To install Java in a system-wide location such as /usr/local, you must login as the root user to gain the necessary permissions. If you do not have root access, install the Java in your home directory or a sub directory for which you have write permissions
  2. Move the .tar.gz archive binary to the current directory.
  3. Unpack the tarball and install Java
    tar zxvf jre-7u7-linux-i586.tar.gz

    The Java files are installed in a directory called jre1.7.0_07 in the current directory.
    In this example, it is installed in the /usr/java/jre1.7.0_07 directory.
  4. Delete the .tar.gz file if you want to save disk space.
Google Chrome
  • Become the root user by running the su command and then enter the super-user password. Type:
    sudo -s
  • Create a directory called plugins if you do not have it. Type:
    mkdir -p /opt/google/chrome/plugins
  • Go to Google chrome plugins directory before you make the symbolic link. Type:
    cd /opt/google/chrome/plugins
  • Create a symbolic link. Type:
    ln -s /usr/local/java/jre1.7.0/lib/amd64/libnpjp2.so
  • Restart your browser and test Java
Mozilla Firefox
  • Become the root user by running the su command and then enter the super-user password. Type:
    sudo -s
  • Create a directory called plugins if you do not have it. Type:
    mkdir -p /usr/lib/mozilla/plugins
  • Go to Google chrome plugins directory before you make the symbolic link. Type:
    cd /usr/lib/mozilla/plugins
  • Create a symbolic link. Type:
    ln -s /usr/local/java/jre1.7.0/lib/amd64/libnpjp2.so
  • or  sudo ln -s /usr/local/java/jre1.7.0_55/lib/i386/libnpjp2.so (use/lib/mozilla/plugins)
  • or  sudo ln -s /usr/local/java/jdk1.7.0_25/jre/lib/i386/libnpjp2.so
  • or sudo ln -s ./jdk1.7.0/jre/lib/i386/libnpjp2.so   (32 bit)
  • Restart your browser and test Java
Source: http://www.java.com/en/download/help/linux_install.xml 

No comments:

Post a Comment