Java tutorial
//package com.java2s; public class Main { /** Returns true if the underlying OS is Mac OS irrespective of SWT */ public static boolean osIsMacOSX() { return System.getProperty("os.name").indexOf("Mac OS") != -1; } }