This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Java in General and the fly likes Query the Java version? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Query the Java version?" Watch "Query the Java version?" New topic
Author

Query the Java version?

Ken Seehof
Greenhorn

Joined: May 07, 2004
Posts: 9
How do I query the current JRE version at runtime?
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30789
    
157

Ken,
javatester.org has an applet that does just that. If you scroll down to the bottom of the page, they show the code that they used to write the applet.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Tim West
Ranch Hand

Joined: Mar 15, 2004
Posts: 539
I haven't looked, but I'm guessing they use System.getProperties() - see the System JavaDoc.



--Tim
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608


Tony Morris
Java Q&A (FAQ, Trivia)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Query the Java version?