用于 cd(更改目录)到 .jar/.ear 文件的软件?
是否有任何软件/脚本允许我 cd(更改目录)到 .jar/.ear/.zip 文件并编辑其中包含的文件的内容?我正在开发一个大型 EJB 项目(恶心),我经常发现自己处于以下情况:
something.ear/
|-- something.jar/
| `-- fileINeedToEdit.xml
我主要通过命令行(Mac/Linux)工作,所以我发现自己使用 jar 解压缩文件 - xvf
,编辑我需要编辑的文件,然后使用jar -cvf
重新压缩。显然,在最初几次之后,这将成为一个令人头疼的问题。
我希望能够将压缩文件视为目录,并且只需使用 cd (或某些替代命令)即可编辑我想要编辑的文件。
有谁知道我怎样才能做到这一点?
Is there any software/script that will allow me to cd (change directories) into .jar/.ear/.zip files and edit the contents of the files it contains? I'm working on a large EJB project (yuck), and I frequently find myself in situations like the following:
something.ear/
|-- something.jar/
| `-- fileINeedToEdit.xml
I work primarily via the command line (Mac/Linux), so I find myself decompressing the files with jar -xvf
, editing the file I need to edit, and then recompressing with jar -cvf
. Obviously, this becomes a major headache after the first few times.
I'd like to be able to treat the compressed files as directories, and simply cd
(or some alternate command) to the file I want to edit.
Does anyone know how I can accomplish this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我同意对你的问题的评论,自动化构建应该允许你轻松地进行这种更改,并且是正确的方法。但如果您坚持这个方向,请检查 fuse-zip,它提供了以下功能用于将 zip 文件安装到任何目录安装点。
I agree with the comments to your question, an automated build should allow you to make this kind of changes easily and is the right way to go. But if you insist in this direction, check fuse-zip, it provides the ability for zip files to be mounted on any directory mount point.
有两种一般策略。要么使用可以将 jar 挂载为伪文件系统的软件。这使您可以像以前一样工作,但我不确定 Mac OS 对用户空间文件系统的支持程度。或者使用已经具有就地编辑支持的工具,例如Windows资源管理器或更强大的编辑器(例如emacs)。
There are two general strategies. Either use software that can mount the jars as pseudo file systems. That allows you to work exactly like you are used to, but I'm uncertain how well Mac OS supports user-space filesystems. Or use a tool that already has in-place editing support, like the Windows explorer or a more powerful editor (e.g. emacs).
我使用这个应用程序之一如果我想检查jar或ear文件中的某些内容
I use one of this application If I want to check something in jar or ear file