Copying one of my answers from a related question:
I would go for netbeans diff api.
- How to use the diff api in netbeans and,
- NetBeans Diff API
From the later url:
Although not a visual implementation, you also have a translation of gnu diff in java.