[Chapter 17] MissingResourceException

#

| Chapter 17 The java.util Package |

# MissingResourceException

## Name

MissingResourceException

## Synopsis

Class Name:

  `java.util.MissingResourceException`

Superclass:

  `java.lang.RuntimeException`

Immediate Subclasses:

  None

Interfaces Implemented:

  None

Availability:

  New as of JDK 1.1

## Description

A `MissingResourceException` is thrown when a requested resource cannot be found.

## Class Summary

    public class java.util.MissingResourceException
                 extends java.lang.RuntimeException {
      // Constructors
      public MissingResourceException(String s, String classname, String key);
      // Instance Methods
      public String getClassName();
      public String getKey();
    }

## Constructors

### MissingResourceException

####

     public MissingResourceException(String s, String classname, String key)

Parameters

  `s`

    The detail message.

  `classname`

    The resource class that generated this exception.

  `key`

    The key that was used to request a resource.

Description

  This constructor creates a `MissingResourceException` with the given information.

## Instance Methods

### getClassName

#### public String getClassName()

Returns

  The class name that generated this exception.

Description

  This method returns the class name that was used to create this exception.

### getKey

#### public String getKey()

Returns

  The key that caused this exception.

Description

  This method returns the key that was used to create this exception.

## 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()` | `Throwable`
`wait()` | `Object` | `wait(long)` | `Object`
`wait(long, int)` | `Object` |  |

## See Also

`Exception`, `ResourceBundle`, `RuntimeException`

Locale |  | NoSuchElementException