Update for Java sample