title: Read /Edit / Write jpg IPTC metadata in Java
body: <p>I am using Apache Commons but it is not enough for me because it is so old technology. So ,i found <a href="https://github.com/dragon66/icafe" rel="nofollow noreferrer">iCafe</a> and it seems better but I am having the error below. Any idea what i am doing wrong?</p>
  
  <pre><code>      private static List&lt;IPTCDataSet&gt; createIPTCDataSet() {
            List&lt;IPTCDataSet&gt; iptcs = new ArrayList&lt;IPTCDataSet&gt;();
            iptcs.add(new IPTCDataSet(IPTCApplicationTag.COPYRIGHT_NOTICE, "Copyright 2014-2016, yuwen_66@yahoo.com"));
            iptcs.add(new IPTCDataSet(IPTCApplicationTag.CATEGORY, "ICAFE"));
            iptcs.add(new IPTCDataSet(IPTCApplicationTag.KEY_WORDS, "Welcome 'icafe' user!"));
  
            return iptcs;
        }
  
        private static IPTC createIPTC() {
          IPTC iptc = new IPTC();
          iptc.addDataSets(createIPTCDataSet());
          return iptc;
        }
  
        public static void main(String[] args) throws  IOException {
  
          FileInputStream fin = new FileInputStream("C:/Users/rajab/Desktop/test/ibo.jpeg");
          FileOutputStream fout = new FileOutputStream("C:/Users/rajab/Desktop/test/ibo/ibo.jpeg");
  
          List&lt;Metadata&gt; metaList = new ArrayList&lt;Metadata&gt;();
          //metaList.add(populateExif(TiffExif.class));
          metaList.add(createIPTC());
          metaList.add(new Comments(Arrays.asList("Comment1", "Comment2")));
  
          Metadata.insertMetadata(metaList, fin, fout);
      }
  }
  </code></pre>
  
  <p><strong>and my EXCEPTION</strong></p>
  
  <blockquote>
    <p>run:
        Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
          at com.icafe4j.image.meta.Metadata.(Unknown Source)
          at vectorcleaner.Metadata1.populateExif(Metadata1.java:41)
          at vectorcleaner.Metadata1.main(Metadata1.java:127)
        Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
          at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
          ... 3 more
        C:\Users\rajab\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53:
    Java returned: 1
        BUILD FAILED (total time: 0 seconds)</p>
  </blockquote>