The goal of this article is to manually add one public attribute into the class file. When the class loader finishes loading the modified class file, we are able to see our manually added field.

After the Java compiler compiles our code, a class file is generated. This class file contains the byte code instructions defined by Java specification. However, it’s still one physical file. In the end, this file has to be loaded into memory, parsed, then the Class object is constructed. Consider this as parsing an XML file, we have to first define what nodes are allowed in…

Ryan Zheng

I am a software developer who is keen to know how things work

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store