Update Java sample