简体   繁体   中英

checksum differs while zipping and unzipping .ear file

I want to add a particular class file in an EAR file.

My EAR has many JAR file. In a particular JAR i want to delete an MyJavaClassFile.class and an updated(fix) MyJavaClassFile.class in the same place as previous.

I have a test.ear. I tried to unzip and zip it mentioned in this link

jar -xvf test.ear

jar -cvf test.ear yourclassesdir 

but there is difference in checksum between ( test.ear ) and ( test.ear --> test/ --> test.ear )

Am I correct with these steps ? If I am wrong guide me..

You definitely did the compression and decompression correctly, I believe the md5 checksum changed due to restructuring of the test.ear after recompression. You have the exact same bytes inside your test.ear but they are now in a slightly different order.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM