How to a find the operating system name in java

Use the System.getProperty("os.name") method

for a full list see List of java system properties