• Post Reply Bookmark Topic Watch Topic
  • New Topic

Removin java version 1.3.1 off my linux  RSS feed

 
James Hall
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need help removing java version 1.3.1 off my Linux machine. I have loaded j2sdk-1_4_2_10 and jakarta-tomcat-5.0.28
When I do a java -version from the prompt I get the wrong java version showing. So I need to know how to remove it. Second my tomcat can not open because JAVA_HOME envir variables are defined incorrectly. Plus
NB: JAVA_HOME should point to a JDK not a JRE.
Could someone please put me back on track.
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Hydro PleaseHelp" --

Please review the naming policy on JavaRanch and change your display name accordingly.

Thanks.
 
James Hall
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry Michael. I have changed my name. Is there any assistance?
 
Nagaraj Shetty B
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you need to use the command from shell prompt
1)which java -- this will display the path where java is installed

2)java -version will display the version of Java that is currently installed

In order to remove, use rmp -e packagename if installed thru a rpm
 
Daniel Rhoades
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is because the old version of Java is on your PATH.

Add $JAVA_HOME/bin to your PATH environment variable (where $JAVA_HOME is the location of your new java install).

Personally I also run:

mv /usr/bin/java* old_java
 
michael byrd
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it may sounds stupid...but i wonder why can you just delete...
 
Dave Tuttle
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you run java it's probably a symblic link pointing to the real java executable.
'whereis java' on my system (os x) shows
'/usr/bin/java'
'ls -l /usr/bin/java' shows
'lrwxr-xr-x 1 root wheel 57 Nov 12 20:16 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Commands/java'
(Your paths will be different).
You can see that '/usr/bin/java' is really a link.
You can do 'mv /usr/bin/java /usr/bin/java.old' then create a new link pointing to the java executable you want to use. For this see 'man ln'.
Then do 'echo $PATH' to see if any other versions of java are on your path.
--Dave
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!