让 Image 任务在 Ant 中工作
我正在尝试利用 Ant 中的 Image 任务,这需要 Java Advanced Imaging。 .jar 文件似乎位于 Ant 库中,但是当我尝试缩放图像时,它给出以下错误:
Could not load a dependent class javax/media/jai/PlanarImage
ant-jai.jar 文件没有这个类的原因是什么?有没有人有在 Ant 中使用 JAI 的经验,或者特别是成功使用 Image 任务的经验?
谢谢!
I'm trying to utilize the Image task in Ant, which requires Java Advanced Imaging. The .jar file seems to be in the Ant library, but when I try to scale an image, it gives me the following error:
Could not load a dependent class javax/media/jai/PlanarImage
Is there a reason why the ant-jai.jar file wouldn't have this class already? Does anyone have experience with using either JAI in Ant, or specifically in using the Image task successfully?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
JAR 仅包含
图像任务
。您还必须将 JAI 放在您的类路径中。附录:关于
NoClassDefFoundError: javax.media.jai.OperationRegistrySpi
,您可以验证该类是否在jai_core.jar
中,如下所示。追踪此类异常的一种方法是使用java
命令的-verbose
选项。The JAR contains only the objects defined in the
Image task
. You'll have to put JAI on your class path, too.Addendum: Regarding
NoClassDefFoundError: javax.media.jai.OperationRegistrySpi
, you might verify that the class is injai_core.jar
, as shown below. One way to track down such anomalies is to use the-verbose
option of thejava
command.