gpt4 book ai didi

java - 如何递归解压 war/ear/pack.gz/tar.gz 类型的文件

转载 作者:行者123 更新时间:2023-12-02 00:08:58 26 4
gpt4 key购买 nike

是否有一种简单明了的方法来递归解压 war/ear/pack.gz/tar.gz 类型的嵌套文件,从而创建一个目录树 - war 中的耳朵等也如此?

我不在乎它是在标准 shell 中还是在 java 中,因为之后我必须继续处理里面的文件。

最佳答案

您可能会找到rjar有帮助,来自文档:

rjar is a command-line tool that acts like the regular jar tool, but recursively ! It is very useful when e.g. using .ear or .war files, or any other "jars of jars"...

Also works zith .zip files !

Supported features :

  • list jar entries recursively : all entries are displayed including entries of nested jars if any
  • expand a jar recursively : expand the jar and its nested jars to the specified directory
  • recreate a jar from an expanded rjar : allows to rebuild a jar with nested jars from an expanded directory structure
  • graphical front-end : tree view of your jars, with regexp filtering

关于java - 如何递归解压 war/ear/pack.gz/tar.gz 类型的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48553010/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com