MalcomTucker
MalcomTucker

Reputation: 7477

Is there a decent tool for comparing/diffing two Java packages?

I'm looking for a tool that will give me a high level view of which files are different between two fairly large Java packages. If I could then drill down into individual files then that would be good. I don't want to go file by file if possible.. any ideas?

thanks

Upvotes: 4

Views: 2773

Answers (9)

linuxbuild
linuxbuild

Reputation: 16133

You can use pkgdiff tool to compare java archives:

pkgdiff A.jar B.jar

See sample report for args4j.

See also japi-compliance-checker for analysis of API changes in your java archives.

enter image description here enter image description here

Upvotes: 1

BoltClock
BoltClock

Reputation: 723729

WinMerge is an excellent Windows standalone diff tool and I use it for almost all of my source files. It can navigate through folder structures (in your case, your Java packages).

If you do use version control, it integrates very well with TortoiseSVN (and perhaps others in the Tortoise family).

Upvotes: 1

ninjalj
ninjalj

Reputation: 43698

Last I checked kdiff3 worked both on *nix and windows.

Upvotes: 0

stacker
stacker

Reputation: 68962

I always use eclipses team synchronize (for included cvs; this requires one revision checked in and another one disk) works same way with subclipse plugin for subversion.

If you are on windows and don't have the checked in a version control system you could use winmerge

Upvotes: 0

Brian Harris
Brian Harris

Reputation: 2795

If you're more interested in API differences than content differences, check out JDiff.

For example the Google Guava project uses it to show changes between releases. Here is the r06 release diff: http://guava-libraries.googlecode.com/svn/tags/release06/javadoc/jdiff/changes.html

Upvotes: 1

omermuhammed
omermuhammed

Reputation: 7385

I have used Araxis Merge to do this too. It is also helpful for doing code merges. It is not free (about 80 bucks I think) but well worth it.

Upvotes: 0

Chris Dennett
Chris Dennett

Reputation: 22721

Eclipse works well. Just select the two different packages (hold the Ctrl key, click on a package, click again on the other package), right click on one of the selected packages, go to the 'Compare With...' submenu, select 'Compare With Each Other'.

Upvotes: 0

Tom Hawtin - tackline
Tom Hawtin - tackline

Reputation: 147164

I use Kompare on Linux. Just a diff GUI front end, that can diff directories recursively. I believe there are many others (I'm sure I've seen a list somewhere).

Upvotes: 0

µBio
µBio

Reputation: 10748

Beyond compare (and other diff tools) can do directory compares too ...

Upvotes: 1

Related Questions