0

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?

Nasser
  • 2,118
  • 6
  • 33
  • 56
  • 1
    http://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
  • 1
    Possible 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 Answers5

2

Check this software and see if it would do the job: Comparing files recursively

2

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).

assylias
  • 321,522
  • 82
  • 660
  • 783
2

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

enter image description here

Dush
  • 1,185
  • 26
  • 29
1

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.

ajith george
  • 538
  • 1
  • 5
  • 14
0

Thanks for the answers. I used Meld which I found a goop option

Nasser
  • 2,118
  • 6
  • 33
  • 56