basic rapo with java code