I'm trying to use this library for Images Metadata Extraction in Java https://github.com/drewnoakes/metadata-extractor , using NetBeans.
I imported the file metadata-extractor-2.7.0.jar into the jar folder of the project, and like the readme says, I simply do:
File file = fc.getSelectedFile ();
try {
Metadata metadata = ImageMetadataReader.readMetadata(file);
} catch ( ImageProcessingException ex ) {
Logger.getLogger ( UserInterface.class.getName() ).log ( Level.SEVERE, null, ex );
} catch ( IOException ex ) {
Logger.getLogger ( UserInterface.class.getName() ).log ( Level.SEVERE, null, ex );
}
but I always get
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/adobe/xmp/XMPException
at com.drew.imaging.jpeg.JpegMetadataReader.<clinit>(Unknown Source)
at com.drew.imaging.ImageMetadataReader.readMetadata(Unknown Source)
at com.drew.imaging.ImageMetadataReader.readMetadata(Unknown Source)
There is something I need to configure in Netbeans before I start using this library?