每个 jar 的最大文件数是多少?

编程入门 行业动态 更新时间:2024-10-28 20:27:59
本文介绍了每个 jar 的最大文件数是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有每个 jar 允许的最大文件数,之后您可能会遇到类路径问题,例如不考虑类?

I'd like to know if there is a maximum number of files allowed per jar, after which you can have classpath issues like classes not taken into account?

推荐答案

jar 格式只是一种重新命名的 zip 格式,因此它继承了该格式的局限性.

The jar format is just a rebranded zip format, so it inherits the limitations of that format.

原始 zip 格式有 65535 个条目的限制,因此在 Java 6 及更早版本中,总共最多可以合并这么多类或其他文件.许多工具还包括作为整体的目录,这减少了可用于类和其他文件的整体.

The original zip format has a limit of 65535 entries, so in total in Java 6 and earlier, you can have at most that many classes or other files, combined. Many tools also include directories as entires, and this reduces the entires available for classes and other files.

在 Java 7 中,zip64支持,有更高的限制.

In java 7, zip64 is supported, with a much higher limit.

我怀疑故障模式不会是随机丢失文件,而是在生成 jar 时失败.

I suspect the failure mode, however, won't be randomly missing files, but failure at jar generation time.

这篇关于每个 jar 的最大文件数是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-03-28 03:12:32,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/716194.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件   jar

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!