Class OperatingSystem

java.lang.Object
io.micronaut.context.condition.OperatingSystem

public final class OperatingSystem extends Object
Details of the current operating system.
  • Method Details

    • getCurrent

      public static OperatingSystem getCurrent()
      Resolves and returns the current operating system.
      Returns:
      the current operating system.
    • isLinux

      public boolean isLinux()
      Returns:
      true if the current operating system is in the Linux family.
    • isWindows

      public boolean isWindows()
      Returns:
      true if the current operating system is in the Windows family.
    • isMacOs

      public boolean isMacOs()
      Returns:
      true if the current operating system is in the macOS family.
    • isSolaris

      public boolean isSolaris()
      Returns:
      true if the current operating system is in the Solaris family.
    • getFamily

      public Requires.Family getFamily()
      Returns:
      The OS family