Saturday, March 12, 2016

Java Examples : How To Get Operating System Name Using System Class

Intro


This examples, will demonstrates how to get operating system name using System class.


Examples


package com.freesamplecode.java.basic;

public class GetOperatingSystemDemo {
 public static void main(String[] args){
  String osName = System.getProperty("os.name");
  
  System.out.println("Your Operating System is : "+osName);
 }
}


Output


Your Operating System is : Windows 7

Screenshot

How To Get Operating System Name Using System Class

Related Posts:

0 comments: