Top Description Constructors Methods
org.graalvm.nativeimage

public final Class VMRuntime

extends Object
Class Inheritance
Imports
java.io.IOException, org.graalvm.nativeimage.impl.HeapDumpSupport, .VMRuntimeSupport

Used for doing VM runtime operations.
Since
19.0

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
dumpHeap(String outputFile, boolean live)

Dumps the heap to the outputFile file in the same format as the hprof heap dump.

public static void
initialize()

Initializes the VM: Runs all startup hooks that were registered during image building.

public static void
shutdown()

Shuts down the VM: Runs all shutdown hooks and waits for all finalization to complete.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

VMRuntimeback to summary
private VMRuntime()

Method Detail

dumpHeapback to summary
public static void dumpHeap(String outputFile, boolean live) throws IOException

Dumps the heap to the outputFile file in the same format as the hprof heap dump.

Exceptions
UnsupportedOperationException:
if this operation is not supported.
Since
20.1
initializeback to summary
public static void initialize()

Initializes the VM: Runs all startup hooks that were registered during image building. Startup hooks usually depend on option values, so it is recommended (but not required) that all option values are set before calling this method.

Invoking this method more than once has no effect, i.e., startup hooks are only executed at the first invocation.

Since
19.0
shutdownback to summary
public static void shutdown()

Shuts down the VM: Runs all shutdown hooks and waits for all finalization to complete.

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 initialize to be called before this method.

Since
19.0