add the java code