Use Case:
bash-3.00$ dd if=/dev/urandom of=myfile.dat bs=1k count=1000000
bash-3.00$ jar cvf myfile.dat.jar ./myfile.dat
added manifest
adding: myfile.datl(in = 1024000) (out= 1024315)(deflated 0%)
-rwxrwxrwx+ 1 haroonn staff 1024000000 Jul 9 21:23 myfile.dat
-rwxrwxrwx+ 1 haroonn staff 1024000000 Jul 9 21:27 myfile2.dat
-rwxrwxrwx+ 1 haroonn staff 1024000000 Jul 9 21:27 myfile3.dat
-rwxrwxrwx+ 1 haroonn staff 1024000000 Jul 9 21:27 myfile4.dat
jar cvf 4gig.jar myfile*
jar xvf 4gig.jar
created: META-INF/
inflated: META-INF/MANIFEST.MF
java.util.zip.ZipException: invalid block type
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:147)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:146)
at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:92)
at sun.tools.jar.Main.extractFile(Main.java:936)
at sun.tools.jar.Main.extract(Main.java:852)
at sun.tools.jar.Main.run(Main.java:242)
at sun.tools.jar.Main.main(Main.java:1149)
Winzip and 7zip were also unable to open this archive
bash-3.00$ dd if=/dev/urandom of=myfile.dat bs=1k count=1000000
bash-3.00$ jar cvf myfile.dat.jar ./myfile.dat
added manifest
adding: myfile.datl(in = 1024000) (out= 1024315)(deflated 0%)
-rwxrwxrwx+ 1 haroonn staff 1024000000 Jul 9 21:23 myfile.dat
-rwxrwxrwx+ 1 haroonn staff 1024000000 Jul 9 21:27 myfile2.dat
-rwxrwxrwx+ 1 haroonn staff 1024000000 Jul 9 21:27 myfile3.dat
-rwxrwxrwx+ 1 haroonn staff 1024000000 Jul 9 21:27 myfile4.dat
jar cvf 4gig.jar myfile*
jar xvf 4gig.jar
created: META-INF/
inflated: META-INF/MANIFEST.MF
java.util.zip.ZipException: invalid block type
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:147)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:146)
at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:92)
at sun.tools.jar.Main.extractFile(Main.java:936)
at sun.tools.jar.Main.extract(Main.java:852)
at sun.tools.jar.Main.run(Main.java:242)
at sun.tools.jar.Main.main(Main.java:1149)
Winzip and 7zip were also unable to open this archive