public final class VMRuntime extends Object
Modifier and Type | Method and Description |
---|---|
static void |
dumpHeap(String outputFile,
boolean live)
Dumps the heap to the
outputFile file in the same format as the hprof heap dump. |
static void |
initialize()
Initializes the VM: Runs all startup hooks that were registered during image building.
|
static void |
shutdown()
Shuts down the VM: Runs all shutdown hooks and waits for all finalization to complete.
|
public static void initialize()
Invoking this method more than once has no effect, i.e., startup hooks are only executed at the first invocation.
public static void shutdown()
This method should only be called once. Invoking this method multiple times can have
continued effects. Also, although recommended, it is not strictly required for
VMRuntime.initialize()
to be called before this method.
public static void dumpHeap(String outputFile, boolean live) throws IOException
outputFile
file in the same format as the hprof heap dump.UnsupportedOperationException
- if this operation is not supported.IOException