O'Reilly logo

Component Development for the Java™ Platform by Stuart Dabbs Halloway

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

5.5. Reading Custom Metadata

The Java binary class format provides a standard set of extensions for adding custom data to binary classes. However, to take advantage of any custom class data at runtime, you must write a custom class loader that is aware of your extensions to the class format. In this section, you will see a custom extension to the class format that includes extra version information, and you will see a custom class loader that uses this information to locate the correct versions of classes that it will load.

Before you jump into the example or apply this technique in your own code, you need to be very careful that your additions to the class do not violate the Java license agreement. You cannot create modified classes that require ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required