how to set classpath and java_home in linux
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, September 26, 2006 06:49 AM

Hi,

can any one help me. i have 2 versions of java installed in my linux machine. i set my environment variable java_home to point to jdk1.5.0_06 . when i echoed it in root it show the correct version which i have set but when i exec java -version command it only point to older version 1.4.2. any idea regarding this


warm regards
pradeepa.R

Re: how to set classpath and java_home in linux

Posted By:   murali_sappa  
Posted On:   Tuesday, September 26, 2006 06:05 PM

Hi Pradeepa,



More than the the java_home variable, the order of the paths in your PATH variable may be causing this behavior. Please check your PATH variable and make sure the path to 1.5.0_06 comes before 1.4.2. We normally handle application dependencies on the JVM ( in a system with multiple JVMs ) by exporting the JAVA_HOME, CLASSPATH, and PATH variables in a shell script that actually invokes the application. Hope this information helps.


Regards,

-Murali

Re: how to set classpath and java_home in linux

Posted By:   Stephen_McConnell  
Posted On:   Tuesday, September 26, 2006 11:51 AM

unfortunately, it sometimes depends upon which version of Linux you have. I use Gentoo Linux and it has a utilty (which can be found in the Gentoo Linux docs on Java and Linux) on how to switch between the various JVMs


Which type of Linux are you using?


Stephen McConnell

About | Sitemap | Contact