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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -