LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Trouble to install JRE 6 in RHEL (https://www.linuxquestions.org/questions/linux-newbie-8/trouble-to-install-jre-6-in-rhel-902176/)

PabloMiranda 09-09-2011 01:15 PM

Trouble to install JRE 6 in RHEL
 
I am setting a remote Red Hat Linux, and need to install JVM 1.6, the current version is java 1.4.2. After downloaded the rpm jre, and install correctly, asked for the installed version with command< java -version > and the system say again java 1.4.2.

I am newbie in Linux, Java and English language, but can read and follow instructions, please anybody can help me.
Thanks

Genocide_Hoax 09-09-2011 01:22 PM

if the installation was clean try rebooting.

PabloMiranda 09-09-2011 01:27 PM

I believe was clean, and already reboot, but nothing...

knudfl 09-09-2011 04:59 PM

The usual solution : Install the package jdk-1.6.0_26-fcs for your architecture:
32bit http://ftp.scientificlinux.org/linux...6-fcs.i586.rpm
64bit http://ftp.scientificlinux.org/linux...fcs.x86_64.rpm

Setting up the new java : 1) su
2)
/usr/sbin/alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_26/bin/java 2

3) /usr/sbin/alternatives --config java
.. And select the "sun jdk6".

.

PabloMiranda 09-09-2011 06:29 PM

Thanks knudfi, i will try later

wpeckham 09-10-2011 09:31 AM

All of that is wrong
 
What you really need to do can be summed up in two steps:
uninstall/remove the OLD version 1.4.2, and make sure that there are links in a path directory for the NEW version (1.6.x).

For the first step, query your package manager (dpkg on Debian based systems, rpm on RH based systems)
For the second, you need to know the install folder for your new version, and make sure there is an environment variable (perhaps defined in /etc/profile or /etc/environment, depending upon your distribution) and that the BIN under that path gets added to the path variable. A little VI editing may be needed for this. You can also simply link all of the critical executable files from that bin folder into {for example} /usr/local/bin. IF that has already been done, simply removing the old version may suffice.

Quite easy for a sysadmin or anyone who normally installs from source. If it seems difficult to you, you may want to get some help from someone comfortable with such changes.

knudfl 09-10-2011 10:04 AM

# 6
Quote:

uninstall/remove the OLD version 1.4.2
No. That's why you have the /etc/alternatives mechanism :
To select between versions.


""query your package manager"" : No jre / jdk package for RHEL5.
The available one, jdk-1.6.0_26-fcs.<arch>.rpm for EL5 :
CERN / Scientific Linux links post # 4.

.


All times are GMT -5. The time now is 12:31 AM.