How do I compare two files using Eclipse? Is there any option provided by Eclipse?

To compare two files in Eclipse, first select them in the Project Explorer / Package Explorer / Navigator with control-click. Now right-click on one of the files, and the following context menu will appear. Select Compare With / Each Other.

enter image description here


Just select all of the files you want to compare, then open the context menu (Right-Click on the file) and choose Compare With, Then select each other..


If one or both of the files you wish to compare isn't in an Eclipse project:

  1. Open the Quick Access search box

    • Linux/Windows: Ctrl+3
    • Mac: ⌘+3
  2. Type compare and select Compare With Other Resource

  3. Select the files to compare → OK

You can also create a keyboard shortcut for Compare With Other Resource by going to WindowPreferencesGeneralKeys

Tags:

Eclipse