show in version name in applet Cache viewer
How to show the version number in Java contr开发者_如何学Col panel?
How to show the version number in Java control panel?
System.out.println(System.getProperty("java.version"));
Or, for more complete information, see properties java.version, java.vm.version, java.specification.version & java.runtime.version.
Sandboxed
Sandboxed values for properties java.version, java.vm.version, java.specification.version & java.runtime.version.
Name Value
java.version 1.6.0_24
java.vm.version 19.1-b02
java.specification.version 1.6
java.runtime.version unknown
Trusted
Trusted values for properties java.version, java.vm.version, java.specification.version & java.runtime.version.
Name Value
java.version 1.6.0_24
java.vm.version 19.1-b02
java.specification.version 1.6
java.runtime.version 1.6.0_24-b07
jcomeau@intrepid:/tmp$ cat test.java; java test
public class test {
public static void main(String[] args) {
System.out.println(System.getProperty("java.version"));
}
}
1.6.0_24
I believe this will work in the control panel as it does from the command line.
精彩评论