Version output

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Feb 2005
Posts: 78
Reputation: nanodano is an unknown quantity at this point 
Solved Threads: 2
nanodano's Avatar
nanodano nanodano is offline Offline
Junior Poster in Training

Version output

 
0
  #1
Aug 3rd, 2007
I've been trying to find a function that returns the version number of the JVM. I found this website that does it, so I know it can be done:

http://www.javatester.org/version.html

Can anyone help me out?
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 4,508
Reputation: Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future 
Solved Threads: 522
Moderator
Featured Poster
Ezzaral's Avatar
Ezzaral Ezzaral is offline Offline
Industrious Poster

Re: Version output

 
0
  #2
Aug 3rd, 2007
"java -version" from the command line or System.getProperty("java.specification.version");
From the docs on this system property
The requirement to identify the Java Runtime is already partially met via the properties specified by the Java Language Specification, §20.18.7 using java.lang.System.getProperties.
  • java.version i.e. Solaris 1.2
  • java.vendor i.e. Sun Microsystems Inc.
Currently these identify the implementation of the Java runtime and the core classes that are available. These properties do not identify the Java Language Specification version that this JDK implements.
Additional properties are needed to identify the version of the Java Runtime Environment specification that this implementation adhere’s to. The properties are:
  • java.specification.version i.e. 1.1
  • java.specification.name i.e. Java™ Language Specification
  • java.specification.vendor i.e. Sun Microsystems Inc.
These properties are accessed using the method java.lang.System.getProperty and return their values as strings.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC