2
更新jar包或者jar包中的文件
source link: https://bajie.dev/posts/20240117-jar_update/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
更新jar包或者jar包中的文件
2024-01-17
1 分钟阅读
jar包可以当作一个zip包来看待。
jar文件:/home/resin.jar 需要更新包中com/caucho/server/port/Port.class类文件
方法1,直接更新:
查看jar包的文件目录结构
jar tf resin.jar
更新指定内容
jar uf resin.jar com/caucho/server/port/Port.class
jar uf testRedis-33.jar redis.properties
方法2,解压替换后再打包:
解压包:
mkdir new
cd new
jar xvf ../testRedis-33.jar
进行修改
vi redis.properties
重新压包
jar cmvf META-INF/MANIFEST.MF t.jar *
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK