No announcement yet.

Compare tow Jar-Files with bcqc.exe

  • Filter
  • Time
  • Show
Clear All
new posts

  • Compare tow Jar-Files with bcqc.exe


    i want to compare two Jar-Files with bcqc.exe get a returcode.

    The two Test-Jars differ only by timestamp. The Binary-Code is identical.
    It seems as if bcqc does not look "in" the archive and just compares the jar-file. I always recieve Errorcode 2.
    If these files were compared with the gui no differences are shown.

    Is there a way to get what i want?



  • #2

    In the GUI, are you expanding the JAR files first, and then comparing the contents inside of the Jar files?
    BCQC would perform the binary scan before double-clicking/expanding the jar file. If you scan just the jar, does it return binary equal in the GUI? To do so, go to Tools -> Options, General, and remove *.jar from the list of archives supported. Then restart BC2.
    Aaron P Scooter Software


    • #3
      if i select the two jars with rightclick and choose left/right side to compare the gui starts with expanded jars. The comparison will then return no differences.
      If i remove *.jar from the known archives the diff will show differences due to the different timestamp of the included class-files.


      • #4
        The two jar files are then not actually binary equal. The GUI is expanding them and then running the comparison on each expanded file individually. The comparison criteria used for this is set in your Session menu -> Comparison Criteria. The default is to check the Filesize and Timestamp. So if the files inside the jar are equal in file size and timestamp, the GUI will return that the files are all equal.

        You can reproduce these results on the command line, but you cannot reproduce these results with BCQC. BCQC compares a single pair of files, and cannot expand and compare folders. To do so, you would use BCScript.

        BCScript is fully documented in the Help file under the Command Line and Scripting reference section. One script example could be (if you jar files are located in c:\folder1 and c:\folder2, and you want to also compare the binary data of each file inside the jar file)

        log verbose c:\BCLog.txt
        criteria binary
        load c:\folder1\myjar.jar c:\folder2\myjar.jar
        folder-report layout: summary &
        Aaron P Scooter Software