Fix compilation error in the Java example.