Skip to content
Advertisement

Javac – plugin not found

I am trying to make my own Javac plugin but things aren’t going so well already 🙁 I am following this tutorial: https://www.baeldung.com/java-build-compiler-plugin and when I want to test the first basic plugin it can’t find it.

When I enter the following command:

javac -cp ./target/classes/javacplugin/ -Xplugin:Getter ./src/main/java/javacPlugin/App.java

I get this error:

plug-in not found: Getter

How do I solve this issue?

This is my sourcetree:

enter image description here

This is my code for the plugin:

JavaScript

This is what’s inside of com.sun.source.util.Plugin:

JavaScript

This is my pom.xml:

JavaScript

Advertisement

Answer

I have solved it:

javac -cp ./target/classes -Xplugin:Getter ./src/main/java/javacPlugin/App.java

Is the right command, without /javacplugin.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement