Class PlatformUtil

java.lang.Object
com.github.markusbernhardt.proxy.util.PlatformUtil

public class PlatformUtil extends Object
Defines some helper methods to find the correct platform.
  • Field Details

  • Constructor Details

    • PlatformUtil

      public PlatformUtil()
  • Method Details

    • getCurrentPlattform

      public static PlatformUtil.Platform getCurrentPlattform()
      Gets the platform we are currently running on.
      Returns:
      a platform code.
    • getDefaultBrowser

      public static PlatformUtil.Browser getDefaultBrowser()
      Gets the ID for the platform default browser.
      Returns:
      a browser ID, null if no supported browser was detected.
    • getCurrentDesktop

      public static PlatformUtil.Desktop getCurrentDesktop()
      Gets the desktop that we are running on.
      Returns:
      the desktop identifier.
    • isGnome

      private static boolean isGnome()
      Checks if we are currently running under Gnome desktop.
      Returns:
      true if it is a Gnome else false.
    • isKDE

      private static boolean isKDE()
      Checks if we are currently running under KDE desktop.
      Returns:
      true if it is a KDE else false.
    • getUserHomeDir

      public static String getUserHomeDir()
      Gets the user home directory where normally all the settings are stored.
      Returns:
      the path to the home directory.