LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-12-2008, 03:41 AM   #1
souvikc
LQ Newbie
 
Registered: Jul 2008
Location: India
Distribution: fedora 6
Posts: 14

Rep: Reputation: 0
Question how to install jdk 1.5 in red hat linux


i have downloaded this version of java -> jdk-1_5_0_06-linux-i586-rpm.bin


but i dont know how to install it.
i am absolutely new to linux.please help me..
 
Old 07-12-2008, 04:06 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
You follow the installation instructions.

Are you really using Red Hat Linux (rather than Fedora or Red Hat Enterprise Linux)? If so, you really should install a newer distro since Red Hat Linux is now obsolete and unsupported.
 
Old 07-12-2008, 04:18 AM   #3
shahz
Member
 
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL, Ubuntu, Fedora
Posts: 368

Rep: Reputation: 29
do the following

#chmod +x jdk-1_5_0_06-linux-i586-rpm.bin

#./jdk-1_5_0_06-linux-i586-rpm.bin



hope it helps

thanks
shahz
 
Old 07-12-2008, 04:52 AM   #4
souvikc
LQ Newbie
 
Registered: Jul 2008
Location: India
Distribution: fedora 6
Posts: 14

Original Poster
Rep: Reputation: 0
Wink

Quote:
Originally Posted by shahz View Post
do the following

#chmod +x jdk-1_5_0_06-linux-i586-rpm.bin

#./jdk-1_5_0_06-linux-i586-rpm.bin



hope it helps

thanks
shahz


yahh i did this.then after the licence things got over i tried the command rpm -i <filename.rpm>. then a rpm file got istalled on the directory where i installed the package..
dont know what to do next..thanx for the reply
 
Old 07-12-2008, 05:01 AM   #5
shahz
Member
 
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL, Ubuntu, Fedora
Posts: 368

Rep: Reputation: 29
you need to have the java command on your path.

#echo $PATH

if its not in your path then bring it on your path.

#find / -name java


thanks
shahz
 
Old 07-12-2008, 05:06 AM   #6
shahz
Member
 
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL, Ubuntu, Fedora
Posts: 368

Rep: Reputation: 29
in my system I found it within

/usr/java/jdk1.5.0_15/jre/bin/

thanks
shahz
 
Old 07-12-2008, 01:37 PM   #7
souvikc
LQ Newbie
 
Registered: Jul 2008
Location: India
Distribution: fedora 6
Posts: 14

Original Poster
Rep: Reputation: 0
Question

Quote:
Originally Posted by shahz View Post
you need to have the java command on your path.

#echo $PATH

if its not in your path then bring it on your path.

#find / -name java


thanks
shahz



after giving the comand echo $PATH i found somthing like this->


/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/souvik/bin

i dont know what to do next..please reply and if possible then in detail...

thanks...waiting for reply
 
Old 07-12-2008, 01:43 PM   #8
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
You want to add the directory containing the executables to your PATH, with

export PATH=$PATH:/path/to/jdk/bin,

obviously replacing "/path/to/jdk/bin" with the relevant directory. You will also want to add this line to your ~/.bashrc file. If there's already an "export PATH=..." line present, then simply add the new directory to the end (adding a ":" before it, if there's not one there already).
 
Old 07-12-2008, 03:47 PM   #9
souvikc
LQ Newbie
 
Registered: Jul 2008
Location: India
Distribution: fedora 6
Posts: 14

Original Poster
Rep: Reputation: 0
Unhappy

Quote:
Originally Posted by Nylex View Post
You want to add the directory containing the executables to your PATH, with

export PATH=$PATH:/path/to/jdk/bin,

obviously replacing "/path/to/jdk/bin" with the relevant directory. You will also want to add this line to your ~/.bashrc file. If there's already an "export PATH=..." line present, then simply add the new directory to the end (adding a ":" before it, if there's not one there already).






i got through the instructions of java installations in the internet..it says->



1. Download the JDK from Sun, to start go here: http://java.sun.com/javase/downloads/index.jsp
2. Click on the "Download" link in the JDK 6 section.
3. Accept the license and continue.
4. Under the "Linux Platform", select "RPM in self-extracting file". As of version 6, it is 57 MB.
5. Download this .bin file and save it to your Linux machine.
6. Once it has been downloaded, login as root and switch to the directory where you saved the file.
7. Execute './filename', where filename is the name of the file that you downloaded. The filename might be very similar to jdk-6-linux-i586-rpm.bin depending on what the latest version is. You may have to make the file executable by executing the 'chmod +x filename.bin' command.
8. You will get a license, press space bar a bunch of times until you are prompted to enter yes or no. Type in yes and hit enter.
9. This will place an .rpm file in the same directory as your .bin file with the same name (minus the .bin part).
10. Install the rpm file by executing 'rpm -i filename.rpm', where filename is the name of your .rpm file. (Such as jdk-6-linux-i586.rpm).
11. Now, if you want to be able to execute this version of Java interpretor or compiler from any directory on your Linux system you will have to create a few symbolic links:
12. ln -s /usr/java/jdk1.6.0/bin/java /usr/bin/java
13. ln -s /usr/java/jdk1.6.0/bin/javac /usr/bin/javac
14. You are done!


every thing worked fine upto the 2nd last line.but after that when i tried to isuue the javac command from the terminal then it says command not found... i think something regarding the path is to be done after this...please help me..can anyone write the next commands for me...i have absolutely no idea about the commands...
 
Old 07-13-2008, 01:30 AM   #10
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Does running "java" work? If not, check what's in the /usr/java/jdk1.6.0/bin directory first of all. If there's nothing there, then something must have gone wrong.
 
Old 07-13-2008, 02:45 AM   #11
souvikc
LQ Newbie
 
Registered: Jul 2008
Location: India
Distribution: fedora 6
Posts: 14

Original Poster
Rep: Reputation: 0
Unhappy

Quote:
Originally Posted by Nylex View Post
Does running "java" work? If not, check what's in the /usr/java/jdk1.6.0/bin/usr/java/jdk1.6.0/bin directory first of all. If there's nothing there, then something must have gone wrong.


i have tried the java command its not working...in the /usr/java/jdk1.6.0/bin...i found these thins->



appletviewer jarsigner javaws jps keytool rmiregistry wsimport
apt java jconsole jrunscript native2ascii schemagen xjc
ControlPanel javac jcontrol jsadebugd orbd serialver
extcheck javadoc jdb jstack pack200 servertool
HtmlConverter javah jhat jstat policytool tnameserv
idlj javap jinfo jstatd rmic unpack200
jar java-rmi.cgi jmap jvisualvm rmid wsgen


please help me i dont know what to do now....
thanz.....waiting for reply....
 
Old 07-13-2008, 03:34 AM   #12
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
OK, that looks fine. It seems your symlink to javac isn't working, or hasn't been created. What does "ls -l /usr/bin/javac" show?
 
Old 07-13-2008, 12:34 PM   #13
souvikc
LQ Newbie
 
Registered: Jul 2008
Location: India
Distribution: fedora 6
Posts: 14

Original Poster
Rep: Reputation: 0
Smile

Quote:
Originally Posted by Nylex View Post
OK, that looks fine. It seems your symlink to javac isn't working, or hasn't been created. What does "ls -l /usr/bin/javac" show?


well i have installed jdk1.6 successfully....
jdk was installed in /usr/java/jdk1.6....
then i needed to set the path...what i did is->
created a file named java.sh in /etc/profile.d directory as su
and then added these lines in the file..
JAVA_HOME=/usr/java/jdk1.6....
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin/
export PATH
then after saving the file,i made it executable by the command:
chmod +x/etc/profile.d/java.sh...java was then installed with its path successfuly..
thank you all for your helping hand...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
During Red Hat Linux 9 install: error "No devices found to install Red Hat Linux" rbradtx Linux - Newbie 11 06-25-2010 05:55 PM
Red Hat Linux WS install walkbyfaith Linux - Newbie 1 05-28-2008 11:05 AM
Red Hat Linux 9 install: error "No devices found to install ... gunneszz Red Hat 1 03-10-2008 05:52 AM
install Red Hat Linux 9 diegouribe Linux - Software 3 03-01-2005 07:47 PM
install Red Hat Linux NipGor Linux - Software 0 01-21-2003 01:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration