PHP code:
echo hash(\'sha256\', \'jake\');
PHP output:
cdf30c6b345276278bedc7bcedd9d5582f5b8e0c1dd858f46ef4ea231f92731d
Java cod
You need to convert the digest to a HEX string before printing it out. Example code can be found here.