Solved

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

Posted on 2008-10-08
12
2,509 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

Question has a verified solution.

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

Suggested Solutions

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…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

679 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