Hi Micho
You should be able to read the 2 image files as binary and compare them by performing a checksum on each. See the java.util.zip.CRC32 class for one such checksum mechanism.
Whether or not this is what you want depends on your definition of 'the same'. This method obviously requires them to be absolutley identical in their binary makeup. Perhaps you want some kind of fuzzy logic comparison of the graphical content of the images? If so, I can't think of any easy way to do that.
Hope this helps
Michael