Project Lombok
  • Features
    • Stable
    • Experimental
  • Community
    • Discuss / Help
    • Issues
    • Documentation for contributors
    • Contact the team behind Project Lombok
  • Order / Donate
  • How to use Install
    • Compilers
    • Javac
    • ECJ
    • Build tools
    • maven
    • gradle
    • ant
    • kobalt
    • IDEs
    • Eclipse
    • IntelliJ IDEA
    • Netbeans
    • MyEclipse
    • Spring Tool Suite
    • JBoss Developer Studio
    • Visual Studio Code
    • Platforms
    • Android
    • GWT
  • Download

JavaC

JDK9+ with module-info.java

Support for JDK9+ if you did modularize your own projects (you've written a module-info.java file):
javac -cp lombok.jar -p lombok.jar ...
Note that you will have to add lombok to your module-info.java file:

module myapp {
	requires static lombok;
}

The 'static' part ensures that you won't need lombok to be present at runtime.

JDK 1.6 - 1.8 or no modules in later versions

Just put lombok on the classpath when compiling with any javac (version 1.6 - 1.8): javac -cp lombok.jar ....

Support for JDK9, if you haven't modularized your own projects yet (no module-info.java yet), is included in lombok starting with version 1.16.20. Just use lombok as normal: javac -cp lombok.jar ...

Support for JDK9 if you did modularize your own projects (you've written a module-info.java file):
javac -cp lombok.jar -p lombok.jar ...
Note that you will have to add lombok to your module-info.java file:

module myapp {
	requires static lombok;
}

The 'static' part ensures that you won't need lombok to be present at runtime.

credits | Copyright © 2009-2025 The Project Lombok Authors, licensed under the MIT license.