类 Platform
java.lang.Object
pkg.exoad.poprock.core.io.Platform
Base service class for some very basic information regarding the system
- 作者:
- Jack Meng
-
构造器概要
-
方法概要
修饰符和类型方法说明static void
__unix_SETENV
(String key, String value) UNIX "export"static String
UNIX "uname"static void
execCommand
(String command) Executes a command in the system using Runtime.getRuntime().exec()static ArchKey
getArch()
Get the architecture of the system (os.arch)static String
Get the OS version (os.version)static PlatformKey
Get the platform of the system (os.name)static boolean
Whether the system's architecture is supported or notstatic boolean
isMacos()
Whether the system is a MACOS systemstatic boolean
Whether the system is supported or notstatic boolean
isUnix()
Whether the system is a UNIX based machinestatic boolean
Whether the system is a desktop Windows system.
-
构造器详细资料
-
Platform
private Platform()
-
-
方法详细资料
-
getOSVersion
Get the OS version (os.version)- 返回:
- The OS version
-
isWindowsDesktop
public static boolean isWindowsDesktop()Whether the system is a desktop Windows system. This function does not check if the system is supported or not.- 返回:
- Whether the system is a desktop Windows system
-
getPlatform
Get the platform of the system (os.name)- 返回:
- The platform of the system
-
isPlatformSupported
public static boolean isPlatformSupported()Whether the system is supported or not- 返回:
- Whether the system is supported or not
-
isMacos
public static boolean isMacos()Whether the system is a MACOS system- 返回:
- Whether the system is a MACOS system
-
isUnix
public static boolean isUnix()Whether the system is a UNIX based machine- 返回:
- Whether the system is a UNIX based machine
-
isArchSupported
public static boolean isArchSupported()Whether the system's architecture is supported or not- 返回:
- Whether the system's architecture is supported or not
-
getArch
Get the architecture of the system (os.arch)- 返回:
- The architecture of the system
-
execCommand
Executes a command in the system using Runtime.getRuntime().exec()- 参数:
command
- The command to execute- 抛出:
IOException
- If the command cannot be executed
-
__unix_UNAME
UNIX "uname"- 返回:
- The output of "uname"
-
__unix_SETENV
UNIX "export"- 参数:
key
- The keyvalue
- The value
-