def _get_java_env(self):
env = super(_DistributedSubmitter, self)._get_java_env()<EOL>if self._streams_connection is not None:<EOL><INDENT>sc = self._streams_connection<EOL>if isinstance(sc._delegator, streamsx.rest_primitives._StreamsRestDelegator):<EOL><INDENT>env.pop('<STR_LIT>', None)<EOL>env.pop('<STR_LIT>', None)<EOL><DEDENT>else:<EOL><INDENT>env['<STR_LIT>'] = sc.get_domains()[<NUM_LIT:0>].id<EOL><DEDENT>if not ConfigParams.SERVICE_DEFINITION in self._config():<EOL><INDENT>env['<STR_LIT>'] = sc.resource_url<EOL>env['<STR_LIT>'] = sc.session.auth[<NUM_LIT:0>]<EOL>env['<STR_LIT>'] = sc.session.auth[<NUM_LIT:1>]<EOL><DEDENT><DEDENT>return env<EOL>
Set env vars from connection if set