• 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

java -version

 
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it safe to assume that if you have two different jdk's installed (thanks to Oracle) that when you issue a command such as:
java -version
at the DOS prompt, that the first jdk referenced in the classpath will be the one which is used?
Oracle installed jdk 1.3.1 at the beginning of my classpath variable and this is why I'm assuming I get 1.3.1 when I issue java -version
Which by the way the jdk 1.3.1 doesn't even show up in my control panel under Add/Remove programs. What's up with that?
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
java -version will run whichever is first in your PATH, not your CLASSPATH -- the latter will be used by whichever JDK Windows chooses to execute, but it's up to Windows to choose one (and it will use PATH to do so.)
Regarding the add/remove: it's perfectly possible to simply copy the JDK files onto a computer where they'll work fine, without having made any registry entries, so they won't show up in add/remove.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic