Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Beginning Java and the fly likes java -version Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "java -version" Watch "java -version" New topic
Author

java -version

Uma Reddy
Greenhorn

Joined: Apr 16, 2010
Posts: 4
Good morning, I am new to Java and currently learning the basics. I have more than 1 JDK version installed on my PC. When I type java -version at the command prompt, how does the system know which version to select.

Thanks in advance,
Uma
Aneesh Vijendran
Ranch Hand

Joined: Jun 29, 2008
Posts: 125
It depends on which java\bin path is mapped in the "path" properties.


Cheers
Aneesh
Nicola Garofalo
Ranch Hand

Joined: Apr 10, 2010
Posts: 308
You can look at the platform installation notes

http://java.sun.com/javase/6/webnotes/install/index.html


Bye,
Nicola
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2343

Welcome to JavaRanch, Uma.


OCUP UML fundamental
ITIL foundation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java -version
 
Similar Threads
java version
JVM for jar
Using lists in a jsp
problem in enhanced for loop
About version.txt