class HelloWorld { public static void main(String[] args) { String systemProperties [] = { "java.vendor", "java.vendor.url", "java.version", "java.class.version", "os.name", "os.arch", "os.version" }; for (int i=0; i < systemProperties.length; i++) { try { String key = systemProperties[i]; String value = System.getProperty(key); System.out.println("\nProperty: " + key + "\nValue: " + value); } catch ( Exception e ) { System.err.println("Exception " + e); } } } }