To get a file's MD5 checksum in Java, you can use the MessageDigest class from the java.security package.