Online Help

To open JDiff main frame, just double click on the "jdiff.jar" jar file, which is auto executable. Of course, this will only work if the ".jar" extension is configured to be opened by default by the JVM. If this is not the case, right click on the jar file and select "open with..." and select your current JVM.

You can then select from the "File" menu the action between file comparison, folder comparison and 3-way merge.

File Diff

Open the "compare Files" menu, and select the 2 version to be compared. You can also switch to the file comparison view and drag and drop them.

You will get red blocks when deleted, green when added and orange when modified.

When rolling the mouse over the "Options" label, the option panel shows up and you can select the character set to be used, the way the UI is shown (vertical or horizontal split) and if you want to see the end of lines characters (which can produce modification while not visible by default)

Folder Diff

Select the "compare folders" menu and select the folders you want to compare. You will get 2 tree views showing both folder contents.

As shown here, an orange recursive background is used to indicate when items are modified somwhere in a sub folder.

When a file is modified, you can select it and use the "compare files" button to get the modification details within the "file comparison" view.

Added files/folders are shown in green, deleted are shown in red.

Merge files

Select the "Merge" menu and define both the 2 files to be compared and their common ancestor. You will get a merge view containing the 2 versions compared and the merge result. JDiff will try an automatic merge, but in case of conflicts, you still can edit the merged view.

The vertical overview side bars on the left and right of the merged view contain clickable items: the above example shows the same line modified differently on both versions, this is a conflict. Clicking on the left red box will use the modification from the left version, clicking on the right red box will use the other modification. The merged view is editable and you can make your own merge when it requires more than just selecting which version to use.

In case of 2 different blocks of code added at the same place, there will also be some kind of conflict: the algorithm assumes both portions are needed, but can't decide which should be placed first, so you will need to choose by selecting also on the same kind of controls.

At last, a deleted block on one side generates a warning region since it may be that this deleted code is still in use in the other version, and the automatic merge cannot check such issue.