Solved

How do I successfully Install JDK & JRE on CentOS 5?

Posted on 2008-10-08
12
2,457 Views
Last Modified: 2013-12-15
I am working on installing Alfresco Labs 3 on a DELL PowerEdge running CentOS 5. In the instructions, it explicitly requires Java JDK 1.6.06 to be running before the linux install can continue.

Unfortunately, the only install from Sun that is available is 1.6.07 (?) so after downloading the rpm, I proceeded to install it. I don't recieve any fail errors or incomplete errors, but when I try to change the default version of Java by performing the following command "alternatives --config java" I recieve no option to switch to the newest JDK.

Does anyone know what I could be missing during the install? Is there something not in the tutorials that I should be doing?

I have read almost every tutorial on installing JDK, so links to tutorials will not be sufficient, unless there is a reference and explanation attached. Thanks in advance,

Eric
0
Comment
Question by:lbeg
  • 6
  • 5
12 Comments
 
LVL 59

Accepted Solution

by:
Kevin Cross earned 500 total points
ID: 22672967
Not sure how to fix the issue, but here is a link to JDK 1.6.06 if the application truly requires that version -- from a technical standpoint it can probably run on newer JVM; however, there are a lot of installs for applications/configuration that have hardcoded values for versions the vendor has tested as I have had ones burp at me on XP SP3 saying I need XP SP2 or higher. :)

https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=jdk-6u6-oth-JPR@CDS-CDS_Developer
0
 
LVL 1

Author Comment

by:lbeg
ID: 22673050
Thanks MWV. I figured something like that could be possible, but I haven't even gotten past successfully installing JDK so I can't be sure if there's a conflict of that nature.
0
 
LVL 1

Author Comment

by:lbeg
ID: 22673057
Is there a specific location you're supposed to run the rpm from? or a service I'm supposed to start?
0
 
LVL 59

Expert Comment

by:Kevin Cross
ID: 22673125
Normally if the install runs without error, you don't have to change anything but admitedly I am not a CentOS or Linux for that matter expert.

After install, you can run:
java --version

If comes back with correct value you are all set.  You can update your %CLASSPATH% to point to the JRE files under the updated JDK instead of old ones.
0
 
LVL 59

Expert Comment

by:Kevin Cross
ID: 22673143
On Windows, when I run "java -version" this is what I get for system with JDK 1.6 update 7.

java version "1.6.0_07"

Java(TM) SE Runtime Environment (build 1.6.0_07-b06)

Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)

Open in new window

0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 59

Assisted Solution

by:Kevin Cross
Kevin Cross earned 500 total points
ID: 22673154
Here is some information on installing on CentOS for older version that should still be applicable:

http:Q_23175384.html
0
 
LVL 1

Author Comment

by:lbeg
ID: 22673155
Thanks mwvisa. It's just so weird that it wouldn't show up after an install.
0
 
LVL 1

Author Comment

by:lbeg
ID: 22673246
I followed the accepted instructions via the link you sent me. Oddly enough, the following happened when I tried to "rpm -im jdk-6u7-linux-i586.rpm"

""
Preparing packages for installation...
        package jdk-1.6.0_07-fcs is already installed
""

So now it's installed but not running?
0
 
LVL 1

Author Comment

by:lbeg
ID: 22673305
I'm trying the additional instructions located here:

http://www.roseindia.net/linux/tutorial/installingjdk5onlinux.shtml
0
 
LVL 1

Author Comment

by:lbeg
ID: 22673412
After following the instructions copied/pasted below I think I have it working. I'll let you know, and I'll be sure to give you points for it.


Installing Sun JDK on Linux (Fedora Core 3)                                              
                                                                                                       
Downloading
 Download the latest version of JDK from http://www.java.sun.com. I have downloaded jdk-1_5_0_01-linux-i586.bin for this tutorial.
Installing
 Change to the directory where you downloaded the SDK ( I downloaded it in my home directory /home/deepak) and make the self-extracting binary executable:    chmod +x jdk-1_5_0_01-linux-i586.bin
 
Run the self-extracting binary, this will display the License agreement text and will ask you to accept the agreement:    ./jdk-1_5_0_01-linux-i586.bin
 
Above command should create a directory called jdk1.5.0_01 in the /home/deepak directory. Move the SDK directory to /usr/java/ .Create /usr/java if it doesn't exist. Here is the command used:    mv jdk1.5.0_01 /usr/java
 
Set the JAVA_HOME environment variable, by modifying /etc/profile so it includes the following:  JAVA_HOME="/usr/java/jdk1.5.0_01"
export JAVA_HOME
   
/etc/profile is run at startup and when a user logs into the system, so you will need to log out and log back in for JAVA_HOME to be defined.  
Check to make sure JAVA_HOME is defined correctly using the command below. You should see the path to your Java SDK.    echo $JAVA_HOME
Output should be
/usr/java/jdk1.5.0_01

0
 
LVL 59

Expert Comment

by:Kevin Cross
ID: 22673508
Good luck.  Sounds like you are on the right track.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now