- Run
./gradlew :open-java-format-eclipse-plugin:buildin the main folder, - Eclipse has to run on Java 21 or later, as current Eclipse packages do. The formatter reaches into
javac, so add these options to
eclipse.iniafter-vmargs:Keep each option and its value on one line, joined by--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED=: the Eclipse launcher starts the JVM inside its own process, and an option split over two lines does not take effect — formatting then fails with anIllegalAccessErrorin the workspace log. - Copy
open-java-format-eclipse-plugin/build/libs/open-java-format-eclipse-plugin-<version>.jarto thedropinsfolder of your Eclipse installation, - Run
eclipse -clean, - Pick
open-java-formatin Window → Preferences (Eclipse → Settings on macOS) → Java → Code Style → Formatter → Formatter implementation.
{{ message }}
