Solved

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

Posted on 2008-10-08
12
2,483 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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
 
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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
HashTable highest marks enumeration alternative 9 37
arguments to jar 5 26
AWS ELB 5 74
pagenation logic how it is working in my code 1 27
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

813 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

16 Experts available now in Live!

Get 1:1 Help Now