public final class Environment
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
checkEnvironment()
Checks the current operating system name and version, JRE version and throws the
EnvironmentException error if they do not meet the minimal operating system and JRE
requirements. |
static java.nio.file.Path |
defaultChromiumDir()
Returns an absolute path to the directory where the Chromium binaries are located by
default.
|
static boolean |
is32Bit()
Indicates whether the current JVM's architecture is 32-bit.
|
static boolean |
is64Bit()
Indicates whether the current JVM's architecture is 64-bit.
|
static boolean |
isArm()
Indicates whether the current JVM's architecture is ARM.
|
static boolean |
isJre8()
Returns
true if the current JRE version is 8. |
static boolean |
isLinux()
Returns
true if the current operating system is Linux. |
static boolean |
isMac()
Returns
true if the current operating system is macOS. |
static boolean |
isMacBigSur()
Returns
true if the current operating system is macOS Big Sur. |
static boolean |
isSupported()
Returns
true if the current environment is supported. |
static boolean |
isWindows()
Returns
true if the current operating system is Windows. |
static boolean |
isWindows64()
Returns
true if the current platform is Windows 64-bit. |
static void |
traceEnvironment()
Prints the current environment details to the log with the INFO level.
|
static java.nio.file.Path |
userHomeDir()
Returns path to the user's home directory.
|
static java.nio.file.Path |
userTempDir()
Returns path to the user's temp directory.
|
static java.util.Optional<java.nio.file.Path> |
win32UserAppDataLocalDir()
Returns an
Optional that contains a string that represents an absolute path to the
local AppData directory of the current user on the Windows platform. |
public static boolean isWindows()
true
if the current operating system is Windows.public static boolean isWindows64()
true
if the current platform is Windows 64-bit.public static boolean isMac()
true
if the current operating system is macOS.public static boolean isMacBigSur()
true
if the current operating system is macOS Big Sur.public static boolean isLinux()
true
if the current operating system is Linux.public static boolean is64Bit()
public static boolean is32Bit()
public static boolean isArm()
public static java.nio.file.Path defaultChromiumDir()
public static boolean isJre8()
true
if the current JRE version is 8.public static void checkEnvironment()
EnvironmentException
error if they do not meet the minimal operating system and JRE
requirements.EnvironmentException
- when the current environment and JRE do not meet the minimal OS
and JRE requirementspublic static boolean isSupported()
true
if the current environment is supported.public static void traceEnvironment()
public static java.util.Optional<java.nio.file.Path> win32UserAppDataLocalDir()
Optional
that contains a string that represents an absolute path to the
local AppData directory of the current user on the Windows platform.java.lang.IllegalStateException
- when the current operating system isn't a Windowspublic static java.nio.file.Path userTempDir()
public static java.nio.file.Path userHomeDir()