• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Want to run both java 1.2 and java 1.5 at the same time

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I Want to run both java 1.2 and java 1.5 at the same time. for this I need to set the environment variable JAVA_HOME, but can I set it for both and path for both??? If I do so, how to I know if I use javac which version is running???

Is it possible first of all.....javascript: x()
Confused
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At the same time ? Not a good idea.
You can have 1.2 and 1.5 on the same machine, and choose which one to use by setting JAVA_HOME and PATH to the correct directory.

If you set both, I think that the one found first in the PATH will be used.
Try "java -version" to check which one is in use.
 
parshu ram
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Satou kurinosuke,

Thanks for your advice, Yes you are correct.

But, I got some applications on, my machine which uses 1.2 ver., I want to work on 1.5. My Idea was not to disturb the existing application. So, as per your advise I should toggle with the JAVA_HOME path when ever I want to work on 1.5. and set back to 1.2 Home when I was to work with the existing applications. Am I correct!!!

-Ram
 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you have scripts which start the current application, then modify the script to call the proper java command (directrly out of the jdk/jre directory, and use -cp to set the classpath. In this manner you can run both versions at the same time without a problem.
 
Hoo hoo hoo! Looks like we got a live one! Here, wave this tiny ad at it:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic