Class OSUtils
The OSUtils class provides constants and methods for detecting the current operating system and performing OS-specific operations. It helps JLine components adapt their behavior based on the platform they're running on, which is particularly important for terminal handling where different operating systems have different terminal implementations and capabilities.
This class includes constants for detecting common operating systems:
- Windows - Including detection of Cygwin and MSYS environments
- Linux
- macOS (OSX)
- AIX
- Other Unix-like systems
It also provides utility methods for working with file paths, environment variables, and other OS-specific features that affect terminal behavior.
This class is used throughout JLine to ensure correct behavior across different platforms, particularly for terminal detection, path handling, and native library loading.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic String
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
Deprecated.static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static final boolean
static String
static String
static String
static String
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
IS_LINUX
public static final boolean IS_LINUX -
IS_WINDOWS
public static final boolean IS_WINDOWS -
IS_OSX
public static final boolean IS_OSX -
IS_AIX
public static final boolean IS_AIX -
IS_CYGWIN
public static final boolean IS_CYGWIN -
IS_MINGW
Deprecated. -
IS_MSYSTEM
public static final boolean IS_MSYSTEM -
IS_WSL
public static final boolean IS_WSL -
IS_WSL1
public static final boolean IS_WSL1 -
IS_WSL2
public static final boolean IS_WSL2 -
IS_CONEMU
public static final boolean IS_CONEMU -
TTY_COMMAND
-
STTY_COMMAND
-
STTY_F_OPTION
-
INFOCMP_COMMAND
-
TEST_COMMAND
-
-
Constructor Details
-
OSUtils
public OSUtils()
-