added Java sample.