Module java.base
Package java.util.jar

## Enum JarFile.Release

- java.lang.Object
- - java.lang.Enum<JarFile.Release>
  - - java.util.jar.JarFile.Release

All Implemented Interfaces:
  Serializable, Comparable<JarFile.Release>

Enclosing class:
  JarFile

    public static enum JarFile.Release
    extends Enum<JarFile.Release>

A set of constants that represent the entries in either the base directory or one of the versioned directories in a multi-release jar file. It's possible for a multi-release jar file to contain versioned directories that are not represented by the constants of the `Release` enum. In those cases, the entries will not be located by this `JarFile` through the aliasing mechanism, but they can be directly accessed by specifying the full path name of the entry.

Since:
  9

### Enum Constant Summary

Enum Constants
Enum Constant and Description
`BASE` Represents unversioned entries, or entries in "regular", as opposed to multi-release jar files.
`RUNTIME` Represents entries found in the META-INF/versions/{n} directory of a multi-release jar file, where `n` is the effective runtime version of the jar file.
`VERSION_9` Represents entries found in the META-INF/versions/9 directory of a multi-release jar file.

### Method Summary

All Methods Static Methods Concrete Methods
`static JarFile.Release` `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static JarFile.Release[]` `values()` Returns an array containing the constants of this enum type, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

### Enum Constant Detail

#### BASE

    public static final JarFile.Release BASE

Represents unversioned entries, or entries in "regular", as opposed to multi-release jar files.

#### RUNTIME

    public static final JarFile.Release RUNTIME

Represents entries found in the META-INF/versions/{n} directory of a multi-release jar file, where `n` is the effective runtime version of the jar file.

Implementation Note:
  The effective runtime version is determined by evaluating `Version.current().major()` or by using the value of the `jdk.util.jar.version` System property if it exists.

#### VERSION_9

    public static final JarFile.Release VERSION_9

Represents entries found in the META-INF/versions/9 directory of a multi-release jar file.

### Method Detail

#### values

    public static JarFile.Release[] values()

Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

    for (JarFile.Release c : JarFile.Release.values())
        System.out.println(c);

Returns:
  an array containing the constants of this enum type, in the order they are declared

#### valueOf

    public static JarFile.Release valueOf(String name)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `IllegalArgumentException` - if this enum type has no constant with the specified name
  `NullPointerException` - if the argument is null