public class RuntimeLib
extends java.lang.Object
Copyright 2001-2008 Partner Software, Inc.
| Constructor and Description |
|---|
RuntimeLib() |
| Modifier and Type | Method and Description |
|---|---|
static void |
cleanupMemory()
Does it's damnedest to clear out memory, both used and available heap.
|
static void |
execAndHalt(java.lang.String command)
Executes the given OS-specific command; then halts the current Java
session.
|
static void |
execAndHalt(java.lang.String[] commands,
java.io.File currentDir)
Executes the given OS-specific command; then halts the current Java
session.
|
static void |
execAndHalt(java.lang.String command,
java.io.File currentDir)
Executes the given OS-specific command; then halts the current Java
session.
|
static void |
execAndHalt(VfsFile executable)
Executes the given program file (e.g.
|
static void |
execAndWait(java.lang.String command)
Same as execAndWait(command, currentDir) but defaulted to the install
dir.
|
static void |
execAndWait(java.lang.String[] commandArray)
Same as execAndWait(commandArray, currentDir) but defaulted to the install
dir.
|
static int |
execAndWait(java.lang.String[] commandArray,
java.io.File currentDir)
A wrapper for Runtime.exec() that handles the problems of grabbing the
input streams and reading from them, and waits for completion.
|
static void |
execAndWait(java.lang.String command,
java.io.File currentDir)
A wrapper for Runtime.exec() that handles the problems of grabbing the
input streams and reading from them, and waits for completion.
|
static void |
execAndWait(VfsFile executable)
Executes the given program file (e.g.
|
static java.lang.Process |
execNoWait(java.lang.String command)
Same as execNoWait(command, currentDir) but defaulted to the install
directory.
|
static java.lang.Process |
execNoWait(java.lang.String[] commands,
java.io.File currentDir)
Same as execAndWait(commands, currentDir) but does not wait - the process
continues in a separate thread.
|
static java.lang.Process |
execNoWait(java.lang.String command,
java.io.File currentDir)
Same as execAndWait(command, currentDir) but does not wait - the process
continues in a separate thread.
|
static void |
execNoWait(VfsFile executable)
Executes the given program file (e.g.
|
static void |
halt()
Shuts down the system.
|
static void |
launchAppAndHalt(java.lang.String appName)
Restart the Java session, calling the given application.
|
static void |
launchAppAndHalt(java.lang.String appName,
java.io.File currentDir)
Restart the Java session, calling the given application.
|
static java.util.List<VfsFile> |
listJarFiles()
Lists all JAR files, both system and modular, used by the classloader.
|
static java.util.List<VfsDirectory> |
listLibraryDirectories()
Lists all os-specific library directories, both system and modular, used by the classloader.
|
static void |
logMemoryUsage()
Logs Java's current heap usage and total heap size.
|
static void |
logOutput(java.lang.Process proc)
Logs all output from a process; waits for result.
|
static void |
restart(java.lang.String appName)
Attempts to restart the given app.
|
static void |
restart(java.lang.String installPath,
java.lang.String appName)
Attempts to restart the given app in the given installation.
|
static void |
restartPartner()
Restarts the main Partner app.
|
static void |
tossOutput(java.lang.Process proc)
Tosses all output from a process.
|
public static void cleanupMemory()
public static void logMemoryUsage()
public static void execAndWait(java.lang.String command)
throws java.io.IOException
java.io.IOExceptionpublic static void execAndWait(java.lang.String[] commandArray)
throws java.io.IOException
java.io.IOExceptionpublic static void execAndWait(java.lang.String command,
java.io.File currentDir)
throws java.io.IOException
java.io.IOExceptionpublic static int execAndWait(java.lang.String[] commandArray,
java.io.File currentDir)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.Process execNoWait(java.lang.String command)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.Process execNoWait(java.lang.String command,
java.io.File currentDir)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.Process execNoWait(java.lang.String[] commands,
java.io.File currentDir)
throws java.io.IOException
java.io.IOExceptionpublic static void execAndHalt(java.lang.String command)
throws java.io.IOException
java.io.IOExceptionpublic static void execAndHalt(java.lang.String command,
java.io.File currentDir)
throws java.io.IOException
java.io.IOExceptionpublic static void execAndHalt(java.lang.String[] commands,
java.io.File currentDir)
throws java.io.IOException
java.io.IOExceptionpublic static void execAndHalt(VfsFile executable)
executable - public static void execNoWait(VfsFile executable)
executable - public static void execAndWait(VfsFile executable)
executable - public static void launchAppAndHalt(java.lang.String appName)
throws java.io.IOException
java.io.IOExceptionpublic static void launchAppAndHalt(java.lang.String appName,
java.io.File currentDir)
throws java.io.IOException
java.io.IOExceptionpublic static void tossOutput(java.lang.Process proc)
public static void logOutput(java.lang.Process proc)
public static void restartPartner()
public static void restart(java.lang.String appName)
public static void restart(java.lang.String installPath,
java.lang.String appName)
public static void halt()
public static java.util.List<VfsFile> listJarFiles() throws java.io.IOException
java.io.IOExceptionpublic static java.util.List<VfsDirectory> listLibraryDirectories() throws java.io.IOException
java.io.IOException