rapoo.coder
rapoo.coder

Reputation: 143

How to run ant apt task on java 1.8

On Ant Apt webiste there is information that trying to run ant apt task on java 1.8 will crash. But in application that i have to change i must use this task because it is built in ant build and is too hard to migrate to using instead of ant apt use javac and javax.annotations api.

Anyone have any idea how to avoid this crash and run Ant apt task on java 1.8.

Upvotes: 1

Views: 1542

Answers (1)

Ian Roberts
Ian Roberts

Reputation: 122364

You have no choice, you must migrate.

The apt tool and its associated com.sun APIs have been deprecated since the release of Java 7, and were removed completely with the release of Java 8. As stated in the relevant JEP:

The apt annotation processing framework is JDK-specific and dates back to JDK 5. The functionality of the API was standardized with JSR 269, which shipped as part of Java SE 6. In JDK 7, the entirety of the apt API was deprecated.

[...]

Users of annotation processing will have ample warning apt has been removed so needed migrations can occur before JDK 8 ships.

Upvotes: 2

Related Questions