Fixed an error in the java example