public static void openFolder(File path)
  {
    String absolutePath = path.getAbsolutePath();
    OperatingSystem os = getCurrentPlatform();
    if (os == OSX)
    {
      try
      {
        Runtime.getRuntime().exec(new String[] { "/usr/bin/open", absolutePath });
        

        return;
      }
      catch (IOException e)
      {
      }
    }
    else if (os == WINDOWS)
    {
      String cmd = String.format("cmd.exe /C start \"Open file\" \"%s\"", new Object[] { absolutePath });
      try
      {
        Runtime.getRuntime().exec(cmd);
        return;
      }
      catch (IOException e)
      {
      }
    }
    try
    {
      Class<?> desktopClass = Class.forName("java.awt.Desktop");
      Object desktop = desktopClass.getMethod("getDesktop", new Class[0]).invoke(null, new Object[0]);
      desktopClass.getMethod("browse", new Class[] { URI.class }).invoke(desktop, new Object[] { path.toURI() });
    }
    catch (Throwable e)
    {
    }
  }