I am comparing two jar files that has the same content but they have different Host OS ( UNIX / FLAT ), as a result they get different CRC. How do I compare them without extracting them ?
I do not want to extract the jar file because actually the application compare between two ear files : each ear is a version of a project ( old version / new version) that has more than 300 jar files. I used to compare two jars using FileUtils.contentEquals, it works great with normal cases ( sample jar files with same Host OS).
boolean isTwoEqual = FileUtils.contentEquals(File1, File2);
I expect the output of isTwoEqual
to be true
when the content of two files is the same, but the actual output is false
because they have different Host OS as a result they get different CRC code.