Adding remote api support for java