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!
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-verboseoption of thejavacommand.