public class WindowsUtils
extends java.lang.Object
Constructor and Description |
---|
WindowsUtils() |
Modifier and Type | Method and Description |
---|---|
static java.io.File |
findSystemRoot()
Finds the system root directory, e.g.
|
static java.lang.String |
findTaskKill()
Finds taskkill.exe
|
static java.lang.String |
getEnvVarIgnoreCase(java.lang.String var) |
static com.google.common.collect.ImmutableList<java.lang.String> |
getPathsInProgramFiles(java.lang.String childPath) |
static java.lang.String |
getProgramFiles86Path() |
static java.lang.String |
getProgramFilesPath()
Returns the path to the Windows Program Files.
|
static void |
killByName(java.lang.String name)
Kill processes by name
|
static void |
killPID(java.lang.String processID)
Kills the specified process ID
|
static java.util.Properties |
loadEnvironment()
Returns the current process environment variables
|
static boolean |
thisIsWindows()
Returns true if the current OS is MS Windows; false otherwise
|
public static void killByName(java.lang.String name)
name
- name of the process to killpublic static void killPID(java.lang.String processID)
processID
- PID to killpublic static java.util.Properties loadEnvironment()
public static java.lang.String getProgramFilesPath()
public static java.lang.String getProgramFiles86Path()
public static com.google.common.collect.ImmutableList<java.lang.String> getPathsInProgramFiles(java.lang.String childPath)
public static java.lang.String getEnvVarIgnoreCase(java.lang.String var)
public static java.io.File findSystemRoot()
public static java.lang.String findTaskKill()
public static boolean thisIsWindows()