A simple, small, lightweight library for instrumenting Java bytecode when retransforming classes with jvmti.
- Finding entries in the constant pool
- Add your own entries to the constant pool
- Finding methods
- Change methods bytecode
Before you start working with the library, you must include the "ClassFile.hpp" header and initialize the class you want to work with

Further work with the class will be done via cf object

All types of constants can be found here
Note: The "Bytecodes.hpp" header must be included before changing method bytecode
x64 Windows 7, 8, 8.1, 10, 11
Visual Studio 2022 will be used as an example
- Clone the repository to a directory you are comfortable with
- Go to releases and download the latest available version of the static libraries
- Extract the archive to the directory where you cloned the repository
- Open your project in Visual Studio, right-click on the project in the Solution Explorer and select "Properties"
- In the "Configuration Properties" section, select "All Configurations" from the "Configuration" dropdown menu
- In the "VC++ Directories" section, select "Include Directories", click on the dropdown menu, click "Edit" and add (path to cloned repository)/include there and click "OK"
- In the same section, select "Library Directories" and add there the path to the static library folder for the desired configuration
- In the "Linker" section, open the "Input" subsection and add JBIL.lib to "Additional Dependencies"
- Done!
You can find more information about classfile structure and bytecode on the Oracle website.



