• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to switch between different JREs

 
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ranchers,

I have got both 1.4 and 1.5 version of JREs installed in my machine. I need to have a switching so that i can make use of either and NOT the latest/higher version which usually dominates the lower.

Can anybody give an idea of how to resolve this?

Thanks in advance.
 
Ranch Hand
Posts: 180
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not getting what do you exactly want.
Where do you want to have the switching?
 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by saurav sarkar:
I am not getting what do you exactly want.
Where do you want to have the switching?



Especially before running my Java programs. Where it could be. Be it in the registry or some other settings if i could do.

Just a way to make out the difference!
[ August 09, 2007: Message edited by: Raghavan Muthu ]
 
saurav sarkar
Ranch Hand
Posts: 180
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i understand i dont know if that could be done....
i also sometimes face this problem......if it is in my development
In my eclipse i keep changing the JRE's
 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by saurav sarkar:
if it is in my development
In my eclipse i keep changing the JRE's



Yeah thats fine. But i want to do it off all the IDEs.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just start your Java programs by specifying the full path to the JRE that you want to use. For example, instead of typing "java com.mypackage.MyClass", type

C:\Java\jdk1.4.2_13\bin\java.exe com.mypackage.MyClass

on the command line. Ofcourse you can also put the command in a batch file, so that you don't have to type that whole line each time.
 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jesper Young:
Just start your Java programs by specifying the full path to the JRE that you want to use. For example, instead of typing "java com.mypackage.MyClass", type

C:\Java\jdk1.4.2_13\bin\java.exe com.mypackage.MyClass

on the command line. Ofcourse you can also put the command in a batch file, so that you don't have to type that whole line each time.



Thanks Jesper. Yes, i am aware of that. But this is just to deviate or divert when running for that moment alone.

If you type "java -version" it gives the JRE installed and active at present. Is there a way i can change it permanently for a while so that the "java -version" also resembles it?
 
Everybody's invited. Even this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic