Class OS
java.lang.Object
org.apache.commons.exec.OS
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringOS family name to test: "win9x"static final StringOS family name to test: "dos"static final StringOS family name to test: "mac"static final StringOS family name to test: "netware"static final StringOS family name to test: "winnt"static final StringOS family name to test: "os/2"static final StringOS family name to test: "os/400"static final StringOS family name to test: "tandem"static final StringOS family name to test: "unix"static final StringOS family name to test: "openvms"static final StringOS family name to test: "windows"static final StringOS family name to test: "z/os" -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanTests whether the OS on which commons-exec is executing matches the given OS architecture.static booleanTests whether the OS is in the DOS family.static booleanTests whether the OS is in the Mac family.static booleanTests whether the OS is in the Netware family.static booleanTests whether the OS is in the OpenVMS family.static booleanTests whether the OS is in the OS/2 family.static booleanTests whether the OS is in the OS/400 family.static booleanTests whether the OS is in the Tandem family.static booleanTests whether the OS is in the Unix family.static booleanTests whether the OS is in the Windows 9x family.static booleanTests whether the OS is in the Windows family.static booleanTests whether the OS is in the Windows NT family.static booleanTests whether the OS is in the z/OS family.static booleanTests whether if the OS on which commons-exec is executing matches the given OS name.static booleanTests whether the OS on which commons-exec is executing matches the given OS family, name, architecture and version.static booleanTests whether the OS on which commons-exec is executing matches the given OS version.
-
Field Details
-
FAMILY_9X
-
FAMILY_DOS
-
FAMILY_MAC
-
FAMILY_NETWARE
-
FAMILY_NT
-
FAMILY_OS2
-
FAMILY_OS400
-
FAMILY_TANDEM
-
FAMILY_UNIX
-
FAMILY_VMS
-
FAMILY_WINDOWS
-
FAMILY_ZOS
-
-
Method Details
-
isArch
-
isFamilyDOS
Tests whether the OS is in the DOS family.- Returns:
- whether the OS is in the DOS family.
-
isFamilyMac
Tests whether the OS is in the Mac family.- Returns:
- whether the OS is in the Mac family.
-
isFamilyNetware
Tests whether the OS is in the Netware family.- Returns:
- whether the OS is in the Netware family.
-
isFamilyOpenVms
Tests whether the OS is in the OpenVMS family.- Returns:
- whether the OS is in the OpenVMS family.
-
isFamilyOS2
Tests whether the OS is in the OS/2 family.- Returns:
- whether the OS is in the OS/2 family.
-
isFamilyOS400
Tests whether the OS is in the OS/400 family.- Returns:
- whether the OS is in the OS/400 family.
-
isFamilyTandem
Tests whether the OS is in the Tandem family.- Returns:
- whether the OS is in the Tandem family.
-
isFamilyUnix
Tests whether the OS is in the Unix family.- Returns:
- whether the OS is in the Unix family.
-
isFamilyWin9x
Tests whether the OS is in the Windows 9x family.- Returns:
- whether the OS is in the Windows 9x family.
-
isFamilyWindows
Tests whether the OS is in the Windows family.- Returns:
- whether the OS is in the Windows family.
-
isFamilyWinNT
Tests whether the OS is in the Windows NT family.- Returns:
- whether the OS is in the Windows NT family.
-
isFamilyZOS
Tests whether the OS is in the z/OS family.- Returns:
- whether the OS is in the z/OS family.
-
isName
-
isOs
Tests whether the OS on which commons-exec is executing matches the given OS family, name, architecture and version.- Parameters:
family- The OS family.name- The OS name.arch- The OS architecture.version- The OS version.- Returns:
- whether the OS matches.
-
isVersion
-