Monday, May 5, 2014

Detecting OS in Java

There is just simple code to get operating system on your java Application.

String os = System.getProperty("os.name");
System.out.print("my OS : "+os); 

if your OS is windows 8, the output will be : my OS Windows 8

0 comments:

Post a Comment