LinuxQuestions.org
Visit Jeremy's Blog.
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 06-16-2008, 04:52 AM   #1
ajeetraina
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu,Red Hat, Fedora
Posts: 292

Rep: Reputation: 30
Issue during JAva installation????


I am struggling with issue installing JAVA on RHEL 4.0.I downloaded the package j2sdk1.4.2_02.rpm and successfully installed through rpm -ivh command.When I say:
Code:
[root@linux ~]# which java
/usr/bin/java
[root@linux ~]# java -version
java version "1.4.2"
gcj (GCC) 3.4.4 20050721 (Red Hat 3.4.4-2)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[root@linux ~]# 
[root@linux ~]#
Still java is not installed ? Help !!!

Last edited by ajeetraina; 06-16-2008 at 06:45 AM.
 
Old 06-16-2008, 04:57 AM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hi.

What do you get from
Code:
rpm -ql j2sdk1.4.2_02 | grep javac
Dave
 
Old 06-16-2008, 04:59 AM   #3
ajeetraina
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu,Red Hat, Fedora
Posts: 292

Original Poster
Rep: Reputation: 30
I am sorry for the wrong package name.I installed j2sdk-1_4_2_13-linux-i586.rpm package in the machine.Now when i run:
[code]
[root@linux ~]# rpm -ql j2sdk-1_4_2_13-linux-i586| grep javac

Its displaying nothing.

Last edited by ajeetraina; 06-16-2008 at 05:06 AM.
 
Old 06-16-2008, 05:27 AM   #4
ajeetraina
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu,Red Hat, Fedora
Posts: 292

Original Poster
Rep: Reputation: 30
Code:
/usr/bin/which: no java in (/usr/java/jdk1.5.0_06/bin:/usr/java/jdk1.5.0_06/bin:/usr/share/mysql/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin)
[root@BL02DL385 ~]# java -version
-bash: java: command not found
[root@BL02DL385 ~]# rpm -ivh j2sdk-1_4_2_13-linux-i586.rpm 
Preparing...                ########################################### [100%]
	package j2sdk-1.4.2_13-fcs is already installed
[root@BL02DL385 ~]# rpm -ivh --force j2sdk-1_4_2_13-linux-i586.rpm 
Preparing...                ########################################### [100%]
   1:j2sdk                  ########################################### [100%]
[root@BL02DL385 ~]# 
[root@BL02DL385 ~]# /usr/bin/which: no java in (/usr/java/jdk1.5.0_06/bin:/usr/java/jdk1.5.0_06/bin:/usr/share/mysql/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin)
[root@BL02DL385 ~]# java -version
-bash: java: command not found
[root@BL02DL385 ~]# rpm -ivh j2sdk-1_4_2_13-linux-i586.rpm 
Preparing...                ########################################### [100%]
	package j2sdk-1.4.2_13-fcs is already installed
[root@BL02DL385 ~]# rpm -ivh --force j2sdk-1_4_2_13-linux-i586.rpm 
Preparing...                ########################################### [100%]
   1:j2sdk                  ########################################### [100%]
[root@BL02DL385 ~]# 
[root@BL02DL385 ~]#

Last edited by ajeetraina; 06-16-2008 at 05:53 AM.
 
Old 06-16-2008, 06:34 AM   #5
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hi again.

OK, you should be able to find out where the binaries are with 'rpm -ql j2sdk-1.4.2_13-fcs | grep javac'. Add the containing directory to your $PATH and you should be good to go.

Dave
 
Old 06-16-2008, 06:38 AM   #6
ajeetraina
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu,Red Hat, Fedora
Posts: 292

Original Poster
Rep: Reputation: 30
Code:
export JAVA_HOME="/opt/j2sdk-1_4_2_13/bin"
export JAVA_PATH="$JAVA_HOME"
export PATH="$PATH:$JAVA_HOME"

Last edited by ajeetraina; 06-16-2008 at 06:45 AM.
 
Old 06-16-2008, 06:43 AM   #7
ajeetraina
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu,Red Hat, Fedora
Posts: 292

Original Poster
Rep: Reputation: 30
[root@BL02DL385 ~]# rpm -ql j2sdk-1.4.2_13-fcs|grep javac
/usr/java/j2sdk1.4.2_13/bin/javac
/usr/java/j2sdk1.4.2_13/man/ja_JP.eucJP/man1/javac.1
/usr/java/j2sdk1.4.2_13/man/man1/javac.1
[root@BL02DL385 ~]#
[root@BL02DL385 ~]#
 
Old 06-16-2008, 06:53 AM   #8
ajeetraina
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu,Red Hat, Fedora
Posts: 292

Original Poster
Rep: Reputation: 30
As directed By you I added in /etc/profile as:

Code:
export JAVA_HOME="/usr/java/j2sdk-1.4.2_13/bin"
export JAVA_PATH="$JAVA_HOME"
export PATH="$PATH:$JAVA_HOME"
 
Old 06-16-2008, 06:55 AM   #9
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
That should do it.

Dave
 
Old 06-16-2008, 06:58 AM   #10
ajeetraina
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu,Red Hat, Fedora
Posts: 292

Original Poster
Rep: Reputation: 30
But it isn't...actlly I deleted /usr/bin/java/alternative file as suggested and then it seems not to work..
Code:
[root@BL02DL385 ~]# which java
/usr/bin/which: no java in (/usr/java/jdk1.5.0_06/bin:/usr/java/jdk1.5.0_06/bin:/usr/share/mysql/bin:/usr/java/jdk1.5.0_06/bin:/usr/java/jdk1.5.0_06/bin:/usr/share/mysql/bin:/usr/java/jdk1.5.0_06/bin:/usr/java/jdk1.5.0_06/bin:/usr/share/mysql/bin:/usr/java/jdk1.5.0_06/bin:/usr/java/jdk1.5.0_06/bin:/usr/share/mysql/bin:/usr/java/jdk1.5.0_06/bin:/usr/java/jdk1.5.0_06/bin:/usr/share/mysql/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/opt/j2re-1_4_2_13/bin:/root/bin)
 
Old 06-16-2008, 07:00 AM   #11
ajeetraina
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu,Red Hat, Fedora
Posts: 292

Original Poster
Rep: Reputation: 30
Why its showing java 1.5...when I have already removed the same.
 
  


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
JAVA JRE installation to view java applet through browser dipenchaudhary Linux - Software 1 01-23-2006 10:20 AM
Java printout issue k1ll3r_x Programming 4 10-19-2005 11:28 PM
Java Issue k1ll3r_x Programming 12 09-15-2005 11:30 AM


All times are GMT -5. The time now is 12:29 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