Dual zipfs
Andrew Hughes
gnu.andrew at redhat.com
Tue May 31 19:33:32 UTC 2016
----- Original Message -----
> I'm running icedtea jre on gentoo.
>
> /opt/icedtea-bin-7.2.6.6/jre/lib/rt.jar contains "java.util.zip" package.
>
> /opt/icedtea-bin-7.2.6.6/jre/lib/ext/zipfs.jar contains
> "com.sun.nio.zipfs" package.
>
> 1) Why both packages exist? They look quite similar.
>
> 2) Where are the sources for the latter?
>
> Thanks in advance.
>
java.util.zip is part of the Java API and has existed since Java 1.1.
com.sun.nio.zipfs is a demonstration of using the NIO 2 API and was
adding in OpenJDK 7. I'm surprised it's actually installed in the main tree
and not the demo tree, actually. It's in
jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs in the OpenJDK
source tree.
While both can be used to access zip files, java.util.zip is the one
to use as it exists in pretty much every version of Java, and is not
specific to Sun/Oracle's implementation.
--
Andrew :)
Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
PGP Key: ed25519/35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
More information about the distro-pkg-dev
mailing list