This discussion is archived
0 Replies Latest reply: Feb 22, 2011 11:28 PM by 842007 RSS

java.lang.NoClassDefFoundError: java/util/zip/CRC32

842007 Newbie
Currently Being Moderated
I have the jdk 1.6.0_23. And during unpacking the file:
ZipInputStream in = new ZipInputStream(new FileInputStream(file));
in.getNextEntry();
OutputStream out = new FileOutputStream(outFile);
int bufsize = 1024;
byte[] buf = new byte[bufsize];
int len;
while ((len = in.read(buf, 0, bufsize)) > 0) {
out.write(buf, 0, len);
}
in.closeEntry();
out.close();
in.close();

I got the following exception:
java.lang.NoClassDefFoundError: java/util/zip/CRC32
at java.util.zip.ZipInputStream.<init>(Unknown Source)

What can be the reason?

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points