Which Java version removed the permanent generation (PermGen)?

The story behind the answer

Java 8 removed the permanent generation, commonly called PermGen.

PermGen was a region used by older HotSpot JVMs to store class metadata and related information. It had a fixed-style capacity model that could produce the familiar java.lang.OutOfMemoryError: PermGen space, especially in applications that repeatedly loaded and unloaded classes, such as application servers.

JDK 8 replaced PermGen with Metaspace. Metaspace stores class metadata in native memory rather than in the JVM's former permanent-generation area. Its growth model is more flexible, although administrators can still impose a ceiling with -XX:MaxMetaspaceSize. The old -XX:PermSize and -XX:MaxPermSize options no longer control the relevant memory area in Java 8.

A frequent mix-up is choosing Java 9 because Java 9 introduced the module system and made other major platform changes. The PermGen transition happened one release earlier, in Java 8, released on March 18, 2014. Later Java versions continue using Metaspace rather than restoring PermGen.

Source: Wikipedia · fact-checked Aug. 2026

Add question to a list

Choose a list to keep this question in: