title: apache commons compress using 7zip
body: <p>i am trying to use the below code that i got from apache commons compress examples webpage to create a zip file using the sevenZ classes hoping it would be faster to compress than regular java zip. this is what my code looks like</p>
  
  <pre><code>public static void main(String[] args) {
      // TODO Auto-generated method stub
      try{
      BufferedInputStream instream = new BufferedInputStream(new FileInputStream("c:/temp/test.txt"));
  
      SevenZOutputFile sevenZOutput = new SevenZOutputFile(new File("c:/temp/7ztest.zip"));
      SevenZArchiveEntry entry = sevenZOutput.createArchiveEntry(new File("c:/temp/test.txt"),"blah.txt");
      sevenZOutput.putArchiveEntry(entry);
      byte[] buffer = new byte[1024];
      int len;
      while ((len = instream.read(buffer)) &gt; 0) {sevenZOutput.write(buffer, 0, len);}
  
      sevenZOutput.closeArchiveEntry();
      sevenZOutput.close();
      instream.close();
      }catch(IOException ioe) {
          System.out.println(ioe.toString());
  
      }
  }
  </code></pre>
  
  <p>i get this error which looks so unrelated</p>
  
  <blockquote>
    <p>Exception in thread "main" java.lang.NoClassDefFoundError: org.tukaani.xz.FilterOptions
        at java.lang.J9VMInternals.verifyImpl(Native Method)
        at java.lang.J9VMInternals.verify(J9VMInternals.java:93)</p>
  </blockquote>
  
  <p>i have the apache packages imported</p>
  
  <blockquote>
    <p>import org.apache.commons.compress.archivers.sevenz.SevenZArchiveEntry;
    import org.apache.commons.compress.archivers.sevenz.SevenZOutputFile;</p>
  </blockquote>
  
  <p>but not sure what the org.tukaani.xz.FilterOptions is, it doesnt look like it is part of the apace commons compress. Any thoughts?</p>