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() |
|
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 |
isFreeBSD()Check is this is FreeBSD |
|
public boolean |
isLinux()Check is this is a Linux flavour |
|
public boolean |
isMacOsX()Check is this is Apple Mac OS X |
|
public boolean |
isNetBSD()Check is this is NetBSD |
|
public boolean |
isSolaris()Check is this is a Solaris flavour |
|
public boolean |
isUnix()Check is this is any kind of Unix-like O/S |
|
public boolean |
isWindows()Check is 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.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 is this is FreeBSD
true if FreeBSDCheck is this is a Linux flavour
true if any kind of LinuxCheck is this is Apple Mac OS X
true if Mac OS XCheck is this is NetBSD
true if NetBSDCheck is this is a Solaris flavour
true if SolarisCheck is this is any kind of Unix-like O/S
true if any kind of Unix-like O/SCheck is this is Microsoft Windows
true if WindowsStringize implementation