LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-28-2005, 05:56 AM   #1
emailssent
Member
 
Registered: Sep 2004
Posts: 312

Rep: Reputation: 30
why old java version is shown instead of new one ??


Dear All,


old java is installed in my system (redhat 9.0(linux))

#java -version
java version "1.3.1"
jdkgcj 0.2.3 (http://www.arklinux.org/projects/jdkgcj)
gcj (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
Copyright (C) 2002 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.

same output either with root or normal user

but i followed documentation "http://java.sun.com/j2se/1.4.2/install-linux.html" and installed new j2sdk 1.4.2 but again when i check its version it is showing old java as

#java -version
java version "1.3.1"


SO WHY IT IS SHOWING OLD JAVA INSTEAD OF NEW ONE.

Any help appreciated,


-jack
 
Old 02-28-2005, 08:02 AM   #2
drisay
Member
 
Registered: Sep 2004
Distribution: Slackware 10
Posts: 167

Rep: Reputation: 30
did you uninstall the older version? it's finding the old java binary in it's path before the new one.
 
Old 03-01-2005, 01:32 AM   #3
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
In your .bash_profile, you should have a line like this:
Code:
export PATH=$PATH:/usr/local/java/bin
What happens if you change this to:
Code:
export PATH=/usr/local/java/bin:$PATH
In other words, adding the java binaries to the front of your path ??

Alternatively, run the command "whereis java" and you should find it is a symbolic link in /usr/bin. Delete it, and if you want, recreate it pointing to the Sun Java binary instead of GJC. Repeat this for javac.

I hope this helps
--Ian
 
  


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 Version Wierness PerfectReign SUSE / openSUSE 7 05-16-2005 10:25 AM
How do I tell what version of Java I have texjauto1 Linux - Newbie 2 03-22-2005 10:36 AM
java -version !!! ???? cherokee10 Linux - Newbie 4 02-07-2005 10:21 AM
Java 2 Plug-in Version 1.3 mvp Linux - Software 11 11-11-2003 11:25 AM
What version of Java comes with Linux? CodeWarrior Linux - Software 5 05-13-2003 04:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:42 AM.

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