3/3/08

Java System Properties

This java code prints some information about your system like Operating system, architecture e.t.c.

class SystemProperties{
public static void main(String[] args) {
System.out.print("User name : ");
System.out.println(System.getProperty("user.name"));
System.out.print("Operating System : ");
System.out.println(System.getProperty("os.name"));
System.out.print("OS version : ");
System.out.println(System.getProperty("os.version"));
System.out.print("Os Architecture : ");
System.out.println(System.getProperty("os.arch"));
System.out.print("Java Classpath : ");
System.out.println(System.getProperty("java.class.path"));
System.out.print("Java version : ");
System.out.println(System.getProperty("java.version"));
System.out.print("Java home : ");
System.out.println(System.getProperty("java.home"));
}
}
Del.icio.us

No comments:

Related Posts Plugin for WordPress, Blogger...