Class OSUtils
- java.lang.Object
-
- org.jline.utils.OSUtils
-
public class OSUtils extends java.lang.ObjectUtility class for operating system detection and OS-specific operations.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
Fields Modifier and Type Field Description static java.lang.StringINFOCMP_COMMANDstatic booleanIS_AIXstatic booleanIS_CONEMUstatic booleanIS_CYGWINstatic booleanIS_LINUXstatic booleanIS_MINGWDeprecated.static booleanIS_MSYSTEMstatic booleanIS_OSXstatic booleanIS_WINDOWSstatic booleanIS_WSLstatic booleanIS_WSL1static booleanIS_WSL2static java.lang.StringSTTY_COMMANDstatic java.lang.StringSTTY_F_OPTIONstatic java.lang.StringTEST_COMMANDstatic java.lang.StringTTY_COMMAND
-
Constructor Summary
Constructors Constructor Description OSUtils()
-
-
-
Field Detail
-
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 public static final boolean 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
public static java.lang.String TTY_COMMAND
-
STTY_COMMAND
public static java.lang.String STTY_COMMAND
-
STTY_F_OPTION
public static java.lang.String STTY_F_OPTION
-
INFOCMP_COMMAND
public static java.lang.String INFOCMP_COMMAND
-
TEST_COMMAND
public static java.lang.String TEST_COMMAND
-
-