---
spec: JVMS
title: "The Java Virtual Machine Specification"
edition: "Java SE 11 Edition"
java_version: 11
chapter: "Chapter 4. The class File Format"
section: "4.7.1"
heading: "4.7.1. Defining and Naming New Attributes"
parent: "4.7. Attributes"
source: https://docs.oracle.com/javase/specs/jvms/se11/html/jvms-4.html#jvms-4.7.1
id: "4.7.1"
url: https://jvm.obfuscated.software/jvms/se11/4.7.1.html
raw: https://jvm.obfuscated.software/jvms/se11/4.7.1.md
---

# 4.7.1. Defining and Naming New Attributes

Compilers are permitted to define and emit `class` files containing new attributes in the `attributes` tables of `class` file structures, `field_info` structures, `method_info` structures, and `Code` attributes ([§4.7.3](4.7.3.md)). Java Virtual Machine implementations are permitted to recognize and use new attributes found in these `attributes` tables. However, any attribute not defined as part of this specification must not affect the semantics of the `class` file. Java Virtual Machine implementations are required to silently ignore attributes they do not recognize.

For instance, defining a new attribute to support vendor-specific debugging is permitted. Because Java Virtual Machine implementations are required to ignore attributes they do not recognize, `class` files intended for that particular Java Virtual Machine implementation will be usable by other implementations even if those implementations cannot make use of the additional debugging information that the `class` files contain.

Java Virtual Machine implementations are specifically prohibited from throwing an exception or otherwise refusing to use `class` files simply because of the presence of some new attribute. Of course, tools operating on `class` files may not run correctly if given `class` files that do not contain all the attributes they require.

Two attributes that are intended to be distinct, but that happen to use the same attribute name and are of the same length, will conflict on implementations that recognize either attribute. Attributes defined other than in this specification should have names chosen according to the package naming convention described in *The Java Language Specification, Java SE 11 Edition* (JLS §6.1).

Future versions of this specification may define additional attributes.
