3

I am currently developing a java program where I need to show the difference between two text. Is there any library available for visually show the difference, that is the diff output in my java program or how can I do so. Any suggestion will be very helpful for me.

BIBD
  • 15,107
  • 25
  • 85
  • 137
Muhammad Asaduzzaman
  • 1,201
  • 3
  • 19
  • 33
  • 1
    check this out :http://stackoverflow.com/questions/319479/generate-formatted-diff-output-in-java – Inv3r53 May 22 '10 at 05:57

2 Answers2

1

I would go for netbeans diff api.

From the later url:

enter image description here

Although not a visual implementation, you also have a translation of gnu diff in java.

aioobe
  • 413,195
  • 112
  • 811
  • 826
  • Thx for the solution. Can I able to use the netBeans Diff API in a standAlone Java Application? – Muhammad Asaduzzaman May 24 '10 at 07:32
  • Sure. It should be possible. You just need to get hold of the jar file containing the proper classes. Here is the api-documentation: http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-diff/index.html?overview-summary.html – aioobe May 24 '10 at 07:45
0

JMeld is a library http://keeskuip.home.xs4all.nl/jmeld/ we have used successfully in our smartGENERATOR product.

The latest version 2.1 is available via * http://sourceforge.net/projects/jmeld/

JMeld 2.1 is available on the central maven repository http://search.maven.org/#artifactdetails|org.jmeld|jmeld|2.1|jar

<dependency>
    <groupId>org.jmeld</groupId>
    <artifactId>jmeld</artifactId>
    <version>2.1</version>
</dependency>
Wolfgang Fahl
  • 15,016
  • 11
  • 93
  • 186