Scientific Linux Forum.org



  Reply to this topicStart new topicStart Poll

> Java installation not recognized
Ocifer
 Posted: Feb 11 2012, 04:52 AM
Quote Post


SLF Junior
**

Group: Members
Posts: 47
Member No.: 333
Joined: 23-June 11









Hi all,

I was just wondering if someone could guide me through the proper way to install java for SL 6?

I've installed it once, adapting commands for a 64-bit version (I'm running 32 bit), but it's not working. I was able to get the .bin from the java site, and create the rpm. The rpm installed, and now if I try again it tells me it's installed.

The output of alternatives --display java
CODE

[mephisto@localhost ~]$ alternatives --display java
java - status is manual.
link currently points to /usr/lib/jvm/jre-1.6.0-openjdk/bin/java
/usr/lib/jvm/jre-1.5.0-gcj/bin/java - priority 1500
slave keytool: /usr/lib/jvm/jre-1.5.0-gcj/bin/keytool
slave orbd: (null)
slave pack200: (null)
slave rmid: (null)
slave rmiregistry: /usr/lib/jvm/jre-1.5.0-gcj/bin/rmiregistry
slave servertool: (null)
slave tnameserv: (null)
slave unpack200: (null)
slave jre_exports: /usr/lib/jvm-exports/jre-1.5.0-gcj
slave jre: /usr/lib/jvm/jre-1.5.0-gcj
slave java.1.gz: (null)
slave keytool.1.gz: (null)
slave orbd.1.gz: (null)
slave pack200.1.gz: (null)
slave rmid.1.gz: (null)
slave rmiregistry.1.gz: (null)
slave servertool.1.gz: (null)
slave tnameserv.1.gz: (null)
slave unpack200.1.gz: (null)
/usr/lib/jvm/jre-1.6.0-openjdk/bin/java - priority 16000
slave keytool: /usr/lib/jvm/jre-1.6.0-openjdk/bin/keytool
slave orbd: /usr/lib/jvm/jre-1.6.0-openjdk/bin/orbd
slave pack200: /usr/lib/jvm/jre-1.6.0-openjdk/bin/pack200
slave rmid: /usr/lib/jvm/jre-1.6.0-openjdk/bin/rmid
slave rmiregistry: /usr/lib/jvm/jre-1.6.0-openjdk/bin/rmiregistry
slave servertool: /usr/lib/jvm/jre-1.6.0-openjdk/bin/servertool
slave tnameserv: /usr/lib/jvm/jre-1.6.0-openjdk/bin/tnameserv
slave unpack200: /usr/lib/jvm/jre-1.6.0-openjdk/bin/unpack200
slave jre_exports: /usr/lib/jvm-exports/jre-1.6.0-openjdk
slave jre: /usr/lib/jvm/jre-1.6.0-openjdk
slave java.1.gz: /usr/share/man/man1/java-java-1.6.0-openjdk.1.gz
slave keytool.1.gz: /usr/share/man/man1/keytool-java-1.6.0-openjdk.1.gz
slave orbd.1.gz: /usr/share/man/man1/orbd-java-1.6.0-openjdk.1.gz
slave pack200.1.gz: /usr/share/man/man1/pack200-java-1.6.0-openjdk.1.gz
slave rmid.1.gz: /usr/share/man/man1/rmid-java-1.6.0-openjdk.1.gz
slave rmiregistry.1.gz: /usr/share/man/man1/rmiregistry-java-1.6.0-openjdk.1.gz
slave servertool.1.gz: /usr/share/man/man1/servertool-java-1.6.0-openjdk.1.gz
slave tnameserv.1.gz: /usr/share/man/man1/tnameserv-java-1.6.0-openjdk.1.gz
slave unpack200.1.gz: /usr/share/man/man1/unpack200-java-1.6.0-openjdk.1.gz
/opt/jre-6u30-linux-i586/bin/java - priority 2
slave keytool: (null)
slave orbd: (null)
slave pack200: (null)
slave rmid: (null)
slave rmiregistry: (null)
slave servertool: (null)
slave tnameserv: (null)
slave unpack200: (null)
slave jre_exports: (null)
slave jre: (null)
slave java.1.gz: (null)
slave keytool.1.gz: (null)
slave orbd.1.gz: (null)
slave pack200.1.gz: (null)
slave rmid.1.gz: (null)
slave rmiregistry.1.gz: (null)
slave servertool.1.gz: (null)
slave tnameserv.1.gz: (null)
slave unpack200.1.gz: (null)
Current `best' version is /usr/lib/jvm/jre-1.6.0-openjdk/bin/java.



Any help? I never got any error messages, so I think it's a matter of linking properly. If someone could tell me what needs to be linked, and explain the locations?

I've restarted Firefox and it still doesn't even recognize java as a plugin when I go to the plugins menu.

Any thoughts are welcome.

EDIT: Poor phrasing. What I meant by the "adapting for a 64 bit version" is that the instructions I found were for a 64-bit version of java, so I had to adapt some of the lines for my 32 bit system. I'm not sure if in doing so I made a mistake. Can anyone reccomend either a way to diagnose what's going on, or a way to cleanly uninstall and try again?
PM
^
U308
 Posted: Feb 11 2012, 03:55 PM
Quote Post


SLF Expert
******

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









I always install from Oracle http://www.oracle.com/technetwork/java/javase/downloads/jre-7u2-download-1377135.html The disadvantage being that you have to check for updates yourself.

I am still on jre-7u1 because 7u2, the latest, isn't a security update, so there was no need to update.

Anyway if you want to use Oracle's java jre runtime, this is how to do it. First part taken from Oracle's site.

Installation of the 64-bit JRE on RPM-based Linux Platforms

This procedure installs the Java Runtime Environment (JRE) for 64-bit RPM-based Linux platforms, such as Red Hat and SuSE, using an RPM binary file (.rpm) in the system location. You must be root to perform this installation.

These instructions use the following file:
jre-7u<version>-linux-x64.rpm

1. Download the file. Before the file can be downloaded, you must accept the license agreement.

2. Become root by running su and entering the super-user password.

3. Uninstall any earlier installations of the JRE packages.
# rpm -e <package_name>

4. Install the package.
# rpm -ivh jre-7u<version>-linux-x64.rpm
To upgrade a package:
# rpm -Uvh jre-7u<version>-linux-x64.rpm

5. Delete the .rpm file if you want to save disk space.

cd /
alternatives --install /usr/bin/java java /usr/java/jre1.7.0_01/bin/java 2

TO REMOVE A VERSION

su -c 'alternatives --remove java /opt/jre1.6.0_26/bin/java' (I had previously installed to /opt)
OR
su -c 'alternatives --remove java /usr/java/jre1.7.0_01/bin/java'

6. Exit the root shell. No need to reboot.


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:
ln -s /usr/java/jre1.7.0_01/lib/amd64/libnpjp2.so /usr/lib64/mozilla/plugins/libnpjp2.so
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