play2-source-watcher-api/src/main/java/com/google/code/play2/watcher/api/FileWatchServices.java
public static String getDefaultWatchServiceId()
    {
        String result = "polling";
        String osName = System.getProperty( "os.name" );
        if ( osName != null )
        {
            osName = osName.toLowerCase( Locale.ENGLISH );
            if ( osName.contains( "windows" ) || osName.contains( "linux" ) )
            {
                result = isAtLeastJava7() ? "jdk7" : "jnotify";
            }
            else if ( osName.contains( "mac" ) )
            {
                result = "jnotify";
            }
        }
        return result;
    }
public static String getDefaultWatchServiceId()
    {
        String result = "polling";
        String osName = System.getProperty( "os.name" );
        if ( osName != null )
        {
            osName = osName.toLowerCase( Locale.ENGLISH );
            if ( osName.contains( "windows" ) || osName.contains( "linux" ) )
            {
                result = isAtLeastJava7() ? "jdk7" : "jnotify";
            }
            else if ( osName.contains( "mac" ) )
            {
                result = "jnotify";
            }
        }
        return result;
    }
Returns default watch service identifier based on operating system.

@return watch service id