开发者

Jar file on Mac OS X

I have a jar file that is used by a Java program.开发者_StackOverflow中文版 It has all the preferences and stuff (it's not an executable). I used archive utility to uncompress it and i edited the files. Now I need to put them back in the jar the same way so the Java program can use it again. How can I do that? Thanks.


The command-line jar utility has its own man page (man jar at the Terminal prompt to see it.) You will have to make sure to tell it about the MANIFEST.MF file, if any, so it gets handled correctly.

Alternatively, jar files are just (usually uncompressed) PKZIP files, and Mac OS X comes with a zip client. Just something like this would be fine:

zip -r0 filename.jar dir1 dir2 dir3

where dir1, dir2, dir3 are the directories you want to be zipped up and appear at the top level of the jar file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜