11 Replies Latest reply: Nov 9, 2006 12:50 PM by 807607 RSS

    Jar Files

    807607
      Hi,

      Suppose I have two different versions of a jar file.
      Is there a way I can see what changed between the two versions?

      Thanks!
        • 1. Re: Jar Files
          807607
          yes, extract from both and see whats changed:

          jar -x [archive.jar]
          • 2. Re: Jar Files
            807607
            There must be a way to see only what has changed - because the method of extracting and manually observing changes is not too practical for bigger jars
            • 3. Re: Jar Files
              807607
              well you can do a byte by byte compare, but then you dont know what you are looking at.

              or maybe you can write a small program that extracts both files, and then walks each extracted directory, and compares the files, and prints which ones are different?

              i think this program would be easy to write in under 2 hours
              • 4. Re: Jar Files
                807607
                There are programs you can buy, but I bet there is an open source tool somewhere.

                Look on sourceforge, I just searched and I think you will find several things that will do it or help

                Message was edited by:
                zadok
                • 5. Re: Jar Files
                  807607
                  Also, I found in eclipse you can compare two jars just by clicking on them and selecting compare->each other.

                  So other IDE's might do the same or it might be worth downloading eclispe just for that.
                  • 6. Re: Jar Files
                    807607
                    zadok, thanks for the info about eclipse. so i made a new project and included the two jars i want to compare in my project.

                    when i right click on the project name, i see an option of 'Compare With >' and then a faded away 'Each Other'.

                    When I select the two jars and then do a right click on them I don't see the 'Compare With' option. What am I doing wrong?
                    • 7. Re: Jar Files
                      807607
                      When I just select the two jars and then right click I just compare with and then I see the option of "each other" and it is not greyed out for me. I don't know what the difference is?
                      • 8. Re: Jar Files
                        807607
                        do you have the jars added in some project?

                        how did you bring the jars into eclipse? i added them in a project that was open.
                        • 9. Re: Jar Files
                          807607
                          make sure you right clikc them and "add them to build path"
                          • 10. Re: Jar Files
                            807607
                            make sure you right clikc them and "add them to build
                            path"
                            They don't have to be in the build path. They don't have to be in the same project. The project needs to be open of course.
                            • 11. Re: Jar Files
                              807607
                              Since you can see the option but it is greyed out it might not make a difference but I am using version 3.2