www.webdeveloper.com
Results 1 to 5 of 5

Thread: Program to find differences between 2 jar files?

Hybrid View

  1. #1
    Join Date
    Jul 2006
    Posts
    373

    Program to find differences between 2 jar files?

    Hi, i have 2 jar files. They are the alike except for a few modifications. I would like a program thar finds those difference since there are too many classes inside and its impossible to do it manually. Can you recommend me a good program to do it?

    Thank you.

  2. #2
    Join Date
    Jul 2006
    Posts
    373
    Hey! any help please??

  3. #3
    Join Date
    Sep 2012
    Posts
    17
    Hi, i don't know if it can help you but, this is what i found from other friends:
    what do youo mean 'difference' ? are you reffering the contents of the files. if so, you can uncompress it by '# jar tf file1.jar > /tmp/file1 ; jar tf file2.jar > /tmp/jar2'
    #diff file1 file2

  4. #4
    Join Date
    Oct 2012
    Posts
    9
    Since jar files are just zip files, I would just extract each jar file into their own directory, using a tool like 7zip, and then compare each directory.

    You can find tools that recursively compare all files in directories by googling "diff entire directory" or something similar.

    Personally, I'd just use Eclipse, and my throwaway CVS installation (just check in each set of files into a branch each, then diff the branches. Quick and dirty, but almost no effort involved).

  5. #5
    Join Date
    Jul 2006
    Posts
    373
    I could do that, but there are several files inside so still, i need a program that can tell me what files are different and where. For example, i have 2 files called example.jar and example2.jar. They are almost identical since they both have 50 classes: a class, b class and so on. The content of each class in example.jar have almost the same content as its counterpart in example2.jar BUT 1 or 2 classes (maybe more) have slight differences in the content. I need to find out which ones are the classes NOT identical to their counterpart and where in the content is the thing that makes them different from each other. It there were only 2 or 3 files i could compare them manually, but there are just way too many so i need a program that can do it for me.

    Thank you.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles