How to get JRE or JDK version programmatically?

Hi,

I'm using eclipse 3.1 and want to get the JRE or JDK version programmatically

I wrote

System.getProperties();

System.getProperty("java.version");

It's not giving any errors, it's working fine but it prints empty values

does any one has any idea about this? and how to do it in another way?

[339 byte] By [natoskiiia] at [2007-11-27 5:30:43]
# 1
This snippet works for me from an application program.String st = System.getProperty("java.version");System.out.println("Version " + st);If that doesn't work, explain where/how you're trying to do this.
ChuckBinga at 2007-7-12 14:55:13 > top of Java-index,Desktop,Runtime Environment...