public interface OperatingSystem
Operating system information.
| Modifiers | Name | Description |
|---|---|---|
enum |
OperatingSystem.Arch |
Enumeration representing common hardware-operating system architectures. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public static OperatingSystem |
current()Returns a representation of the operating system that the JVM currently runs on. |
|
public java.util.List<File> |
findAllInPath(String name)Find all files in system search path of a certain name. |
|
public File |
findInPath(String name)Locates the given exe in the system path. |
|
public OperatingSystem.Arch |
getArch()Architecture underlying the operating system |
|
public String |
getArchStr()Architecture underlying the operating system |
|
public java.util.List<String> |
getExecutableNames(String executablePath) |
|
public String |
getHomeVar()The name of the environment variable that keeps the home directory. |
|
public String |
getName() |
|
public java.util.List<File> |
getPath()List of system search paths |
|
public String |
getPathSeparator()The character used to separate elements in a system search path |
|
public String |
getPathVar()The name of the environment variable that keeps the system path. |
|
public String |
getSharedLibraryName(String libraryName)Returns OS-specific shared library name |
|
public String |
getSharedLibrarySuffix()OS-dependent string that is used to suffix to shared libraries |
|
public String |
getStaticLibraryName(String libraryName)Returns OS-specific static library name |
|
public String |
getStaticLibrarySuffix()OS-dependent string that is used to suffix to static libraries |
|
public String |
getVersion() |
|
public boolean |
isBsd()Check if this is any kind of BSD-like O/S |
|
public boolean |
isFreeBSD()Check if this is FreeBSD |
|
public boolean |
isLinux()Check if this is a Linux flavour |
|
public boolean |
isMacOsX()Check if this is Apple Mac OS X |
|
public boolean |
isNetBSD()Check if this is NetBSD |
|
public boolean |
isSolaris()Check if this is a Solaris flavour |
|
public boolean |
isUnix()Check if this is any kind of Unix-like O/S |
|
public boolean |
isWindows()Check if this is Microsoft Windows |
|
public String |
toString()Stringize implementation |
Returns a representation of the operating system that the JVM currently runs on.
Find all files in system search path of a certain name.
name - Name to look forLocates the given exe in the system path.
name - Name of exe to search for.null if not found.Architecture underlying the operating system
OperatingSystem.Arch.UNKNOWN is it cannot be identified. In that a
caller might need to use getArchStr() to help with identification.Architecture underlying the operating system
The name of the environment variable that keeps the home directory.
List of system search paths
The character used to separate elements in a system search path
The name of the environment variable that keeps the system path.
Returns OS-specific shared library name
libraryName - This can be a base name or a full name.OS-dependent string that is used to suffix to shared libraries
Returns OS-specific static library name
libraryName - This can be a base name or a full name.OS-dependent string that is used to suffix to static libraries
Check if this is any kind of BSD-like O/S
true if any kind of BSD-like O/SCheck if this is FreeBSD
true if FreeBSDCheck if this is a Linux flavour
true if any kind of LinuxCheck if this is Apple Mac OS X
true if Mac OS XCheck if this is NetBSD
true if NetBSDCheck if this is a Solaris flavour
true if SolarisCheck if this is any kind of Unix-like O/S
true if any kind of Unix-like O/SCheck if this is Microsoft Windows
true if WindowsStringize implementation