• 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

Is it possible to use multiple JDK's?

 
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it possible to use multiple JDK's? I need two because of clients that won't upgrade yet. I need to have 2 JDK's, working and installed. Would I just have to keep switching the path to the different versions? I need one for personal projects (and testing) and one for projects to be released.
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Correct. I've had a Java 1.4 and a Java 6 JDK installed simultaneous for years at work. Right now, at home I have a Java 6 and a Java 7 JDK installed. To start using the Java 7 JDK all I had to do was modify the JAVA_HOME variable, as that's what I'm using inside the PATH variable.
 
john price
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cool, thanks! Is there an easy way to modify the variables? In Windows, without going to the "Environment Variables". Aka, is there a command I can type to change the variable?
Thanks,
John Price
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try
set PATH="C:\Program Files\jdk1.2.3_04\bin";$PATH$
or similar when you open your command line.
 
Campbell Ritchie
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If $PATH$ doesn't work try %PATH% instead. Sorry for the mistake.
 
Campbell Ritchie
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can also declare the path in full whenever you invoke a command. Instead of writing java Foo try "C:\Program Files\java\jdk1.2.3_45\bin\java" Foo
You may need quote marks because the path includes spaces.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic