• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2549
  • Last Modified:

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

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
lbeg
Asked:
lbeg
  • 6
  • 5
2 Solutions
 
Kevin CrossChief Technology OfficerCommented:
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
 
lbegAuthor Commented:
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
 
lbegAuthor Commented:
Is there a specific location you're supposed to run the rpm from? or a service I'm supposed to start?
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Kevin CrossChief Technology OfficerCommented:
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
 
Kevin CrossChief Technology OfficerCommented:
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
 
Kevin CrossChief Technology OfficerCommented:
Here is some information on installing on CentOS for older version that should still be applicable:

http:Q_23175384.html
0
 
lbegAuthor Commented:
Thanks mwvisa. It's just so weird that it wouldn't show up after an install.
0
 
lbegAuthor Commented:
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
 
lbegAuthor Commented:
I'm trying the additional instructions located here:

http://www.roseindia.net/linux/tutorial/installingjdk5onlinux.shtml
0
 
lbegAuthor Commented:
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
 
Kevin CrossChief Technology OfficerCommented:
Good luck.  Sounds like you are on the right track.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now