JAVA sample code for Capy