Fork me on GitHub


The Hotspot JVM allows to provide a command file for the JIT compiler (see -XX:CompileCommandFile).

Using this project, you can generate this file automatically from annotations in the source code.


The Hotspot JIT does a tremendous work optimizing your code, don’t see this as “@Inline for the masses” : this is not a cheap way to make your code faster.

Also, this is not portable and uses an internal feature of the Hotspot JVM.

Only use this if you know what you are doing and have a good reason to.


  • Add the jar to your compilation classpath (or grab it directly at Maven central repository):

  • Add annotations in your source code :

    public void method01() {

    See samples and integration tests.

  • When your program is compiled, the file is generated at META-INF/hotspot_compiler

  • You can then run your program using the compile command file:

    java -XX:CompileCommandFile:target/classes/META-INF/hotspot_compiler ...