Add Scala example, fix java example and add commands to run examples to the readme