Following example can be used to print useful system related information on the console:

Java Code:
String version = System.getProperty("java.version");
String vendor = System.getProperty("java.vendor");
String osArch = System.getProperty("os.arch");
String osName = System.getProperty("os.name");


System.out.println("Java Version: " + version);
System.out.println("Java Vendor: " + vendor);
System.out.println("OS Architecture: " + osArch);
System.out.println("OS Name: " + osName);
Output:
Java Code:
Java Version: 1.5.0_11
Java Vendor: Sun Microsystems Inc.
OS Architecture: x86
OS Name: Windows XP