I want to compare two text files and want to highlight the differences. Can any one of you help me in doing that thro Java program.
Thanks in advance.
I want to compare two text files and want to highlight the differences. Can any one of you help me in doing that thro Java program.
Thanks in advance.
Copying one of my answers from a related question:
I would go for netbeans diff api.
From the later url:
Although not a visual implementation, you also have a translation of gnu diff in java.
The google-diff-match-path library seems to provide the functionality you need. Here's a demo of it in action.
In Eclipse right click on filename in navigator bar, then select "Compare With".