Tuesday 26 August 2014

Get Operating System name

Use property "os.name" to get the operating system name.

public class GetProperty {
    public static void main(String args[]){
        System.out.println(System.getProperty("os.name"));
    }
}

Output
Windows 7


                                                             Home

No comments:

Post a Comment