Solved

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

Posted on 2008-10-08
12
2,528 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
12 Comments
 
LVL 60

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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 60

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 60

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 60

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 60

Expert Comment

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

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
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.
Suggested Courses

623 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