且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在不重新打包整个jar的情况下更新jar中的一个文件?

更新时间:2023-09-12 23:20:46

-C 正在更改本地目录,正在寻找那里有 hi.png 。它不能控制你将它注入JAR文件的位置。

-C is changing the local directory, and is looking for hi.png there. It's not controlling where you're trying to inject it into the JAR file.

我会尝试制作一个名为 images $ c的新目录$ c>,将你的本地 hi.png 移动到那里,使 images 当前工作目录的子目录,然后运行这个:

I would try making a new directory called images, moving your local hi.png into that, making images a child directory of your current working directory, then just run this:

jar uf myfile.jar images\hi.png