ant java任务,如何在Java 1.8上运行ant apt任务

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.

解决方案

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值