public static String getAllUsersApplicationDataDirectory() {
    final String result;
    if (isRunningWindows()) {
      // This should be the same as passing CSIDL_COMMON_APPDATA to the native SHGetFolderPath()
      // Win32 function.
      result = System.getenv("ProgramData");
    } else if (isRunningLinux()) {
      result = "/etc/opt";
    } else if (isRunningMacOSX()) {
      result = "/Library/Application Support";
    } else {
      // Fallback to local user directory
      result = System.getProperty("user.home");
    }
    return FileUtils.ensureTrailingSlash(result);
  }
Determines the machine-wide application data directory in a platform-independent way. Note that
the directory returned by this method is usually not writable for users without administrative
privileges (yes, even on Windows). The path returned by this method always contains a trailing
path separator.

@return the machine-wide application data directory
java/zylib/src/main/java/com/google/security/zynamics/zylib/system/SystemHelpers.java