[Chapter 12] VirtualMachineError

#

| Chapter 12 The java.lang Package |

# VirtualMachineError

## Name

VirtualMachineError

## Synopsis

Class Name:

  `java.lang.VirtualMachineError`

Superclass:

  `java.lang.Error`

Immediate Subclasses:

  `java.lang.InternalError`,

  `java.lang.OutOfMemoryError`,

  `java.lang.StackOverflowError`,

  `java.lang.UnknownError`

Interfaces Implemented:

  None

Availability:

  JDK 1.0 or later

## Description

The appropriate subclass of `VirtualMachineError` is thrown to indicate that the Java virtual machine has encountered an error.

## Class Summary

    public class java.lang.VirtualMachineError extends java.lang.Error {
      // Constructors
      public VirtualMachineError();
      public VirtualMachineError(String s);
    }

## Constructors

### VirtualMachineError

#### public VirtualMachineError()

Description

  This constructor creates a `VirtualMachineError` with no associated detail message.

#### public VirtualMachineError(String s)

Parameters

  `s`

    The detail message.

Description

  This constructor creates a `VirtualMachineError` with the specified detail message.

## Inherited Methods

Method | Inherited From | Method | Inherited From
--- | --- | --- | ---
`clone()` | `Object` | `equals(Object)` | `Object`
`fillInStackTrace()` | `Throwable` | `finalize()` | `Object`
`getClass()` | `Object` | `getLocalizedMessage()` | `Throwable`
`getMessage()` | `Throwable` | `hashCode()` | `Object`
`notify()` | `Object` | `notifyAll()` | `Object`
`printStackTrace()` | `Throwable` | `printStackTrace(PrintStream)` | `Throwable`
`printStackTrace(PrintWriter)` | `Throwable` | `toString()` | `Object`
`wait()` | `Object` | `wait(long)` | `Object`
`wait(long, int)` | `Object` |  |

## See Also

`Error`, `InternalError`, `OutOfMemoryError`, `StackOverflowError`, `Throwable`, `UnknownError`

VerifyError |  | Void