When I search for "java diff" I get a few hits--did those not meet your needs?
Joined: Aug 27, 2002
I was able to generate the basic diff output . if you are on unix box, the command would look like
$ diff file1.txt file2.txt
To get "Unified Format" , the command on unix is
$ diff -u file1.txt file2.txt
specifically I'm trying to generate the output which should be same as that of
$ diff -aNU20 file1.txt file2.txt
looking at some jars available, i think its possible to create the desired output I'm looking for, with additional coding and some math logic.
Python comes up with package for creating unified diff, http://docs.python.org/library/difflib.html
Looks like there is no solid API available in java for this requirement.
Thank you for the replies, really appreciate looking at this issue for me.