public class getSystemProperties {
public static void main(String[] args) {
String os=System.getProperty("os.name");
System.out.println("Current OS Name: "+os);
String home=System.getProperty("user.home");
System.out.println("Home directory of Current user : "+home);
String version=System.getProperty("os.version");
System.out.println("Versio of OS: "+ version);
String arch=System.getProperty("os.arch");
System.out.println("Architecture of OS: "+ arch);
String jver=System.getProperty("java.version");
System.out.println("Java Version: "+jver);
String uname=System.getProperty("user.name");
System.out.println(uname);
}
}
public static void main(String[] args) {
String os=System.getProperty("os.name");
System.out.println("Current OS Name: "+os);
String home=System.getProperty("user.home");
System.out.println("Home directory of Current user : "+home);
String version=System.getProperty("os.version");
System.out.println("Versio of OS: "+ version);
String arch=System.getProperty("os.arch");
System.out.println("Architecture of OS: "+ arch);
String jver=System.getProperty("java.version");
System.out.println("Java Version: "+jver);
String uname=System.getProperty("user.name");
System.out.println(uname);
}
}
No comments:
Post a Comment
Please post your comments. Your comments make us to write more programs for you.