windows - How does installers check for java version -


what method(s) used program installer check java version? use simple "java -version" command or there other more sophisticated ways. *windows os

the way i'd check java version running simple class following:

class versionchecker {     public static void main(string[] args) {         system.out.println(system.getproperty("java.version"));     } } 

edit: reason why java -version give this:

java version "1.8.0_45" java(tm) se runtime environment (build 1.8.0_45-b14) java hotspot(tm) 64-bit server vm (build 25.45-b02, mixed mode) 

and don't want have parse that.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -