Replace call to unix 'cmp' command with a Java function