问题
I have created two java projects both have some common package structure and also same class. I want to compare these two projects and get each difference. Is there any software to get difference between two projects.
回答1:
For windows, the best choice is BeyondCompare. If you want it free - take WinMerge. Under Unix, the best choice is Meld which is written in python, thus being also the only cross-platform alternative of the three.
All these tools support 2-way folder comparison which is what you seem to need here.
回答2:
There's BeyondCompare. It's not free, but it is very good
回答3:
Another option is to use a source code control system like subversion or git or bazaar or mercurial.
回答4:
Have you ever used WinMerge? you can use it to compare two folders and it will show you the differences between them.
WinMerge
回答5:
The interface is definitely dated, but I love xxdiff for showing complex diffs and merge conflicts. Superb tool.
If you'd like to know what the differences are going forward, you might want to place both versions under a version control system like git, which can make finding differences (and moving changed code) very easy. But I'd have to want to do the same task again tomorrow to go this extra step. :)
来源:https://stackoverflow.com/questions/5064927/how-to-get-source-code-difference-between-two-projects