Showing posts with label jre. Show all posts
Showing posts with label jre. Show all posts

Monday, March 17, 2014

Installing Sun JRE (Java Run-time Environment ) in Ubuntu

Hi Everyone,

Some-times ago, I gave you the installation steps for Sun Java  ( Now Oracle Java ) for the Ubuntu Linux @ my previous post about installing sun jre  . But now that doesn't seems to work even for me as Oracle has removed the binary ( .bin ) file from their website . Even the steps given at https://www.java.com/en/download/help/linux_install.xml  or the PPA method of webupd8 as mentioned in Ubuntu Community Wiki doesn't seems to help.

So, I decided to do something different, which I have formulated in steps as below :-

1) Download the rpm file labelled as "Linux RPM" from the java website

2) Install alien package from Ubuntu repositories.
         sudo apt-get install alien
3) Go to the directory where you have downloaded the rpm file. For example, if your file was downloaded to Downloads directory then :-
         cd ~/Downloads
4) Use alien to Convert the rpm package to deb package. This may take a while.
         sudo alien --to-deb --scripts jre-7u51-linux-i586.rpm
5) Use dpkg to install the newly generated deb package.
         sudo dpkg -i jre_1.7.051-1_i386.deb
    You can also use The Ubuntu-Software-Center or GDebi-Package-Installer for the above purpose.
6) Use following command to verify the installation :- 
          java -version

Output will be something similar to this as show in the above screenshot:-

java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) Client VM (build 24.51-b03, mixed mode, sharing)

7) To install the firefox plugin, do the following :-
    a) Go to Firefox-plugin install directory
            cd /usr/lib/firefox-addons/plugins/
    b) create a soft-link ( shortcut ) for the Java plugin in the directory :-
            sudo ln -s /usr/java/jre1.7.0_51/lib/i386/libnpjp2.so .
    c) To verify, you can launch Firefox and type about:plugins and its ready for use.
8) To install the java plugin for Google chrome, do the following:-
   a) Go to Google chrome installation directory
         cd /opt/google/chrome
   b) create a directory named plugins here ( if its not there ) . At least, it was absent from mine chrome installation ;) 
        sudo mkdir plugins
   c) Now create a soft-link ( shortcut ) for the Java plugin in the directory :-
         sudo ln -s /usr/java/jre1.7.0_51/lib/i386/libnpjp2.so .
   d) Now, you can launch Google chrome and type chrome://plugins/ to verify the installation and start using the plugin.

Note:- The above steps have been tested on The Lubuntu 14.04 beta 1.

Thursday, September 22, 2011

Installing Sun JRE (Java Run-time Environment ) in Ubuntu

Installing Sun JRE (Java Run-time Environment ) in Ubuntu

# Steps to install Sun JRE :

1) Download the bin file ( Linux self-extracting ) from here :

http://www.java.com/en/download/linux_manual.jsp

2) make the file executable :

Code:
      chmod u+x <file>
3) Get the root access :

Code:
         sudo -s
( It will prompt for your password )

4) Go to /usr directory :

Code:
          cd /usr
5) Make a directory named java

Code:
          mkdir java
6) Go to the java directory :

Code:
          cd java
7) run the downloaded file with full path :


e.g.
Code:
        /home/user_name/Downloads/jre-6u25-linux-i586.bin

This will install the JRE in your system.
# Additional Steps to install firefox-4.0 plugin

8) Go to firefox plugin directory :

Code:
        cd /usr/lib/firefox-4.0/plugins/
9) Create a link for the plugin :

Code:
       ln -s /usr/java/jre1.6.0_24/lib/i386/libnpjp2.so
10) For confirming the installation of plugin, close all firefox windows and re-open it .

Type in :

       about:plugins
in the awesome bar ( as firefox calls it ) and pressing enter key .

11) You can also confirm the installation of java plugin by the following link :

http://www.java.com/en/download/help/testvm.xml


Courtesy : http://www.java.com/en/download/help/linux_install.xml
Also available at : http://ubuntuforums.org/showthread.php?t=1764374