This code snippet will you let you know which java version and JRE version you are using and your code is executing in which environement
1 2 3 4 5 6 7 | String[] pro = { "java.version" , "java.vm.version" }; Properties properties = System.getProperties(); for ( int i = 0 ; i < pro.length; i++) { System.out.print(pro[i]+ "\t\t: " ); System.out.println(properties.getProperty(pro[i])); } |