Re: Compare two files in HTML

101 views
Skip to first unread message

vaibhav shukla

unread,
Jan 15, 2014, 2:24:36 AM1/15/14
to dais...@googlegroups.com
I guess this would work for you

      public static void main(String[] args) throws Exception {


                  File fileOne = new File("PATH-TO-FILE-ONE");

                  File fileTwo = new File("PATH-TO-FILE-TWO");



                 String[] daisyDiffArgs = { fileOne.getAbsolutePath(), fileTwo.getAbsolutePath()

                                                     };

                Main.main(daisyDiffArgs, "");    // Modify the Main class so that you can give the name to the output html file.


                Desktop.getDesktop().open(new File("/Users/vshukla/Music/final.html")); 

           }

Let me know if that works for you.

On Friday, April 19, 2013 4:40:23 AM UTC+5:30, Infant Gerald wrote:
I have the same issue. I am trying to pragmatically consume the outputs and format the same according to my needs. I have a 1000 Files to diff and need to identify which are the files that have difference and what % is the difference and what are the differences. I am trying to use the DaisyDiff.diffTag(xxx, yyy, contentHandler); & DaisyDiff.diffHTML(xxx, yyy, contentHandler, arg3, arg4);

Is there any documentation of code snippets where some one actually did compare two files through a java program.

- Gerald

On Tuesday, 9 October 2012 02:13:01 UTC-7, Eric wrote:
Dear DaisyDiff Team,
 
I am having two HTML files in form of String. I need to implement the Compare File feature with highlites. I have checked the forum and blogs but was not able to get a proper understanding.
 
Please suggest me what shall I do so that I can achieve this feature.
 
Any help appreciated...
 
Regards,

Eric
Reply all
Reply to author
Forward
0 new messages