Adding remote api support for java

Same here.