Scientific Linux Forum.org



  Reply to this topicStart new topicStart Poll

> Different ways of Installing java jre from Oracle
U308
 Posted: Jun 27 2011, 07:43 AM
Quote Post


SLF Expert
******

Group: Members
Posts: 503
Member No.: 32
Joined: 11-April 11









Someone asked me about this so here is how I did it. (If using 32 bit just substitute accordingly).

Download the bin file jre-6u26-linux-x64.bin from http://www.oracle.com/technetwork/java/javase/downloads/jre-6u26-download-400751.html
Save to Desktop.

AS ROOT

1. mv /home/user/Desktop/jre-6u26-linux-x64.bin /opt/
2. cd /opt/
3. chmod +x jre-6u26-linux-x64.bin
4. ./jre-6u26-linux-x64.bin (the./ means you will run the install script)
5. cd /usr/sbin
6. alternatives --install /usr/bin/java java /opt/jre1.6.0_26/bin/java 2
7. cd /
8. usr/sbin/alternatives --config java (or type:
source /etc/profile.d/java.sh
alternatives --config java)

After completion of step 8. you should see something like this:-

There is 1 program that provides 'java'.

Selection Command
-----------------------------------------------
*+ 1 /opt/jre1.6.0_26/bin/java

Enter to keep the current selection[+], or type selection number:
[root@localhost /]#

9. usr/sbin/alternatives --display java
Tests to see all OK. You should get something like this:-

java - status is manual.
link currently points to /opt/jre1.6.0_26/bin/java
/opt/jre1.6.0_26/bin/java - priority 2
Current `best' version is /opt/jre1.6.0_26/bin/java.

Now the browser links.

Opera.

Tools>Preferences>Advanced>Content>Plug-in Options>Change Path>Add
Browse to /opt/jre1.6.0_26/lib/amd64
OK>OK>OK

Firefox.

I made a soft link ..

ln -sf /opt/jre1.6.0_26/lib/amd64/libnpjp2.so /usr/lib64/mozilla/plugins/

Check about:plugins

Test the browser(s) http://www.java.com/en/download/help/testvm.xml

[I also did this although I am not sure whether needed. I have never needed it.
(Also as root)

gedit /etc/profile.d/java.sh

Enter the following environment variables:

export J2RE_HOME=/opt/jre1.6.0_26
export PATH=$J2RE_HOME/bin:$PATH

Add an empty line at the end of the file.]

TO REMOVE A VERSION

su -c 'alternatives --remove java /opt/jre1.6.0_24/bin/java'
PM
^
TheFstX
 Posted: Jun 27 2011, 08:37 AM
Quote Post


SLF Rookie
*

Group: Members
Posts: 21
Member No.: 339
Joined: 24-June 11









Nice manual! I've tested it without any problems. Works fine.
PMEmail PosterUsers Website
^
redman
 Posted: Jun 27 2011, 10:45 AM
Quote Post


SLF Admin
********

Group: Admins
Posts: 1571
Member No.: 2
Joined: 8-April 11









Installing JRE can be done easier (especially the part of activating the plugin).

32 bits systems
Remove any older JRE package if installed.
Remove /usr/lib/mozilla/plugins/libnpjp2.so (if present).
Install the new rpm package.
Create a soft link to the plugins directory:
CODE
ln -s /usr/java/jre1.6.0_26/lib/i386/libnpjp2.so /usr/lib/mozilla/plugins/libnpjp2.so


64 bits systems
Remove any older JRE package if installed.
Remove /usr/lib/mozilla/plugins/libnpjp2.so (if present).
Install the new rpm package.
Create a soft link to the plugins directory:
CODE
ln -s /usr/java/jre1.6.0_26/lib/amd64/libnpjp2.so /usr/lib64/mozilla/plugins/libnpjp2.so


wink.gif


--------------------
What is SL? - Forum Rules - Info on 3rd Party Repos

Desktop: ASUS P5QPL-AM, Intel Dual-Core E6500, 4GB DDR2, ASUS GeForce GT 430 1GB, SL6.5 x86_64
Laptop: ASUS X58L, Intel Dual-Core T3200, 3GB DDR2, Intel GMA X3100, RHEL6.5 x86_64
Test box: Intel S5000PSL, 2x Intel Xeon E5310, 8GB ECC DDR2 FB-DIMM, ASUS GeForce GT 220 1GB, SL6.5 x86_64
PM
^
U308
 Posted: Jun 27 2011, 11:05 AM
Quote Post


SLF Expert
******

Group: Members
Posts: 503
Member No.: 32
Joined: 11-April 11









redman, hello.

Are you by any chance referring to openjdk ? If so I am not keen on it and have therefore tried to show how to install from Oracle's site. Furthermore if it is openjdk you refer to, is it the latest jre update 26 ? (previous ones were patched).

On the other hand if it is not openjdk, that would be good news but where did you find the rpm ? smile.gif

Now, I don't want to be blamed for keeping you from work where it counts viz. making money,
so take your time replying. cool.gif
PM
^
redman
 Posted: Jun 27 2011, 11:10 AM
Quote Post


SLF Admin
********

Group: Admins
Posts: 1571
Member No.: 2
Joined: 8-April 11









QUOTE (U308 @ Jun 27 2011, 01:05 PM)
Are you by any chance referring to openjdk ? If so I am not keen on it and have therefore tried to show how to install from Oracle's site.

Nope, I'm talking about the one from java.com (Oracle): link.

Just download the self-extracting RPM file.
Chmod it to 777 and run is as user (!).
It will extract the rpm and try to install it.
Of course the installation will fail because you are a regular user (duhhh).
Then follow the instructions I posted before.
Really nothing more to it.

QUOTE (U308 @ Jun 27 2011, 01:05 PM)
Now, I don't want to be blamed for keeping you from work where it counts viz. making money, so take your time replying.  cool.gif

Heh heh ... nobody is looking http://fuzedglobal.com/forums/public/style_emoticons/default/facepalm.gif


--------------------
What is SL? - Forum Rules - Info on 3rd Party Repos

Desktop: ASUS P5QPL-AM, Intel Dual-Core E6500, 4GB DDR2, ASUS GeForce GT 430 1GB, SL6.5 x86_64
Laptop: ASUS X58L, Intel Dual-Core T3200, 3GB DDR2, Intel GMA X3100, RHEL6.5 x86_64
Test box: Intel S5000PSL, 2x Intel Xeon E5310, 8GB ECC DDR2 FB-DIMM, ASUS GeForce GT 220 1GB, SL6.5 x86_64
PM
^
mamasboy
 Posted: Jul 12 2011, 10:54 AM
Quote Post


SLF Newbie


Group: Members
Posts: 6
Member No.: 403
Joined: 9-July 11









Hi,

I'd installed java-1.6.0-openjdk-1.39.1.9.8.el6_1 using yumex.

I can't find libnpjp2.so. Is that the wrong package?
PM
^
redman
 Posted: Jul 12 2011, 10:59 AM
Quote Post


SLF Admin
********

Group: Admins
Posts: 1571
Member No.: 2
Joined: 8-April 11









QUOTE (mamasboy @ Jul 12 2011, 12:54 PM)
I'd installed java-1.6.0-openjdk-1.39.1.9.8.el6_1 using yumex.

Openjdk is something else.
The JRE (Java Runtime Environment) package isn't part of any repo (for legal reasons).
You need to download and install it manually.


--------------------
What is SL? - Forum Rules - Info on 3rd Party Repos

Desktop: ASUS P5QPL-AM, Intel Dual-Core E6500, 4GB DDR2, ASUS GeForce GT 430 1GB, SL6.5 x86_64
Laptop: ASUS X58L, Intel Dual-Core T3200, 3GB DDR2, Intel GMA X3100, RHEL6.5 x86_64
Test box: Intel S5000PSL, 2x Intel Xeon E5310, 8GB ECC DDR2 FB-DIMM, ASUS GeForce GT 220 1GB, SL6.5 x86_64
PM
^
tux99
 Posted: Jul 12 2011, 11:42 AM
Quote Post


SLF Guru
********

Group: Members
Posts: 1294
Member No.: 224
Joined: 28-May 11









QUOTE (redman @ Jul 12 2011, 11:59 AM)
QUOTE (mamasboy @ Jul 12 2011, 12:54 PM)
I'd installed java-1.6.0-openjdk-1.39.1.9.8.el6_1 using yumex.

Openjdk is something else.
The JRE (Java Runtime Environment) package isn't part of any repo (for legal reasons).


I don't think it's for legal reasons, some Linux distros used to ship the official JRE and if you look at the license it explicitly allows redistribution. The reason why distros these days prefer OpenJDK is because it's now mature enough as a replacement and it's true FOSS.


--------------------
My personal SL6 repository, specialized in audio/video software: http://pkgrepo.linuxtech.net/el6/
(can be used together with EPEL and ELRepo repositories) - repository mirror: http://linuxsoft.cern.ch/linuxtech/el6/
PM
^
redman
 Posted: Jul 12 2011, 12:39 PM
Quote Post


SLF Admin
********

Group: Admins
Posts: 1571
Member No.: 2
Joined: 8-April 11









QUOTE (tux99 @ Jul 12 2011, 01:42 PM)
... and it's true FOSS.

As I said, legal reasons wink.gif
Red Hat won't ship packages with RHEL and Fedora that isn't GPL.


--------------------
What is SL? - Forum Rules - Info on 3rd Party Repos

Desktop: ASUS P5QPL-AM, Intel Dual-Core E6500, 4GB DDR2, ASUS GeForce GT 430 1GB, SL6.5 x86_64
Laptop: ASUS X58L, Intel Dual-Core T3200, 3GB DDR2, Intel GMA X3100, RHEL6.5 x86_64
Test box: Intel S5000PSL, 2x Intel Xeon E5310, 8GB ECC DDR2 FB-DIMM, ASUS GeForce GT 220 1GB, SL6.5 x86_64
PM
^
tux99
 Posted: Jul 12 2011, 12:51 PM
Quote Post


SLF Guru
********

Group: Members
Posts: 1294
Member No.: 224
Joined: 28-May 11









QUOTE (redman @ Jul 12 2011, 01:39 PM)
QUOTE (tux99 @ Jul 12 2011, 01:42 PM)
... and it's true FOSS.

As I said, legal reasons wink.gif
Red Hat won't ship packages with RHEL and Fedora that isn't GPL.


Surely you meant FOSS? smile.gif

RHEL and Fedora contain many packages that aren't GPL, GPL is only one out of many existing FOSS compatible licenses.


--------------------
My personal SL6 repository, specialized in audio/video software: http://pkgrepo.linuxtech.net/el6/
(can be used together with EPEL and ELRepo repositories) - repository mirror: http://linuxsoft.cern.ch/linuxtech/el6/
PM
^
redman
 Posted: Jul 12 2011, 01:54 PM
Quote Post


SLF Admin
********

Group: Admins
Posts: 1571
Member No.: 2
Joined: 8-April 11









Of course you're right, I'm talking about packages that are FOSS.

I'm so used to explaining GPL that it comes automatically to mind when mentioning any kind of free software (sorry RMS) laugh.gif
But I've updated my sig so no more slip of the tongue keyboard.


--------------------
What is SL? - Forum Rules - Info on 3rd Party Repos

Desktop: ASUS P5QPL-AM, Intel Dual-Core E6500, 4GB DDR2, ASUS GeForce GT 430 1GB, SL6.5 x86_64
Laptop: ASUS X58L, Intel Dual-Core T3200, 3GB DDR2, Intel GMA X3100, RHEL6.5 x86_64
Test box: Intel S5000PSL, 2x Intel Xeon E5310, 8GB ECC DDR2 FB-DIMM, ASUS GeForce GT 220 1GB, SL6.5 x86_64
PM
^
francocerisola
 Posted: Jul 18 2011, 06:12 PM
Quote Post


SLF Newbie


Group: Members
Posts: 2
Member No.: 482
Joined: 18-July 11









There is something I just don't get. How can I know a new Java version is available without manually checking?
Suppose there is a security issue, I'd like to be notify right away.
PM
^
redman
 Posted: Jul 18 2011, 07:48 PM
Quote Post


SLF Admin
********

Group: Admins
Posts: 1571
Member No.: 2
Joined: 8-April 11









QUOTE (francocerisola @ Jul 18 2011, 08:12 PM)
There is something I just don't get. How can I know a new Java version is available without manually checking?

You need to check it manually or read the news on a serious IT related news site.
As far as I know Oracle doesn't have a mailinglist where they announce new releases of Java.


--------------------
What is SL? - Forum Rules - Info on 3rd Party Repos

Desktop: ASUS P5QPL-AM, Intel Dual-Core E6500, 4GB DDR2, ASUS GeForce GT 430 1GB, SL6.5 x86_64
Laptop: ASUS X58L, Intel Dual-Core T3200, 3GB DDR2, Intel GMA X3100, RHEL6.5 x86_64
Test box: Intel S5000PSL, 2x Intel Xeon E5310, 8GB ECC DDR2 FB-DIMM, ASUS GeForce GT 220 1GB, SL6.5 x86_64
PM
^
redman
 Posted: Aug 30 2011, 07:10 PM
Quote Post


SLF Admin
********

Group: Admins
Posts: 1571
Member No.: 2
Joined: 8-April 11









The discussion on the possible licence change from Java has been moved.
It can be found here.


--------------------
What is SL? - Forum Rules - Info on 3rd Party Repos

Desktop: ASUS P5QPL-AM, Intel Dual-Core E6500, 4GB DDR2, ASUS GeForce GT 430 1GB, SL6.5 x86_64
Laptop: ASUS X58L, Intel Dual-Core T3200, 3GB DDR2, Intel GMA X3100, RHEL6.5 x86_64
Test box: Intel S5000PSL, 2x Intel Xeon E5310, 8GB ECC DDR2 FB-DIMM, ASUS GeForce GT 220 1GB, SL6.5 x86_64
PM
^
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll