944,149 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 1285
  • Java RSS
Aug 3rd, 2007
0

Version output

Expand Post »
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?
Similar Threads
Reputation Points: 36
Solved Threads: 2
Junior Poster in Training
nanodano is offline Offline
78 posts
since Feb 2005
Aug 3rd, 2007
0

Re: Version output

"java -version" from the command line or System.getProperty("java.specification.version");
From the docs on this system property
Quote ...
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.
Moderator
Featured Poster
Reputation Points: 3239
Solved Threads: 839
Posting Genius
Ezzaral is offline Offline
6,761 posts
since May 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Searching a Text Field in a JList
Next Thread in Java Forum Timeline: Unicode, CSV





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC