Implement Java method calling function.