how to check if the file content is same as the revision in server perforce JAVA API. Before updating any file into perforce depot, I want to check is there any difference in content of local file and the depot file. if there is no difference then ignore to submit that file.
I think you want the getDiffFiles() method:
Alternatively, for the specific thing you're doing (not submitting unchanged files), just use the "leaveUnchanged" submit option rather than doing the same work yourself.