JAR limitations

Is there a limit to the size of file that can be stored in a JAR file or is the limit dictated by the underlying file system limit?
[138 byte] By [JonBa] at [2007-11-27 6:08:12]
# 1
Theoretically I don't believe there is a file size limit imposed by jar.exe or the JVM.Some systems however may or may not have pre-set file size limitations on JAR files however. These are most likely systems that are designed to run on limited resources like mobile devices.
maple_shafta at 2007-7-12 17:10:15 > top of Java-index,Desktop,Deploying...
# 2
In Sun's implementation of zip/jar code, the size of a jar file is limited to 4GB. See bugid 4681995 at bugs.sun.com for an RFE to support larger files.
bevada at 2007-7-12 17:10:15 > top of Java-index,Desktop,Deploying...
# 3

I'm aware that the original ZIP file format limits the archive file to a maximum size of 4GB however I've been unable to find documentation from Sun that states the JAR file format is limited to a maximum file size of 4GB or that the JAR file format is based on the original ZIP file format and not the ZIP64 file format.

In tests using JDK 1.5 the Jar tool will create and extract a JAR file that is larger than 4GB suggesting that the JAR file format is based on ZIP64 and that the limit on the size of a JAR file is dictated by the underlying file system limit.

I've also been able to create and extract files from a JAR file larger than 4GB using the java.util.jar package in JDK 1.5 too.

I'm after some official documentation from Sun that states the actual limits of the JAR file format or that the JAR file format is definitely based on the ZIP or ZIP64 file format.

A comment on that bug says that 1.5 can create a JAR file larger than 4GB which is what I've found in testing but I've been unable to find anything in the release notes to say the JAR file format has changed?

JonBa at 2007-7-12 17:10:15 > top of Java-index,Desktop,Deploying...
# 4
See my followup posting in the very-similar-to-this thread: http://forum.java.sun.com/thread.jspa?forumID=535&threadID=5178835
bevada at 2007-7-12 17:10:15 > top of Java-index,Desktop,Deploying...