I have a Java project that consists of more than 100 classes. The project later has been updated (i.e. some classes have been changed). What I want to do is I want to compare between the two versions and get the classes that have been changed. Is it possible to use the diff
command? or are there any other options?

- 2,118
- 6
- 33
- 56
-
1http://www.scootersoftware.com/download.php – Darshan Mehta Mar 10 '17 at 10:27
-
Isn't [this question](http://stackoverflow.com/questions/1552340/how-to-list-the-file-names-only-that-changed-between-two-commits) what you want to do? You could filter the list later to have only *.java files. – Sergey Mar 10 '17 at 10:30
-
1Possible duplicate of [diff to output only the file names](http://stackoverflow.com/questions/6217628/diff-to-output-only-the-file-names) – Joe Mar 10 '17 at 10:42
5 Answers
Check this software and see if it would do the job: Comparing files recursively

- 94
- 2
- 11
If you use a control version system (you do, right?), it should be straight forward to do that (and will show you the differences in a more user-friendly way than using diff).
Put the original files in a folder. Create a repository and commit all the files. Replace the files with the new version. See the differences with the CVS tools (for example, with git, using git gui or git diff).

- 321,522
- 82
- 660
- 783
I also wanted to compare different versions of java projects. I used Inntellij IDE community edition. It can also compare two folders visually and merge. For more details refer here in Intellij IDE docs

- 1,185
- 26
- 29
If you are interested in third party tools, use beyond compare (http://www.scootersoftware.com/download.php). There is an option to compare directories/folders, which will show the files with changes.

- 538
- 1
- 5
- 14