How can the RMI client do a lookup if it communicates with the outside world via a proxy server?

Doug Bell

RMI supports both direct socket connections and connections through a proxy via HTTP tunneling. Assuming the firewall has an HTTP proxy, a client can connect to an RMI server outside the firewall. The logic necessary to detect and select the transmission protocol is contained within the Socket produced by the default RMISocketFactory.

There are some limitations and configuration issues. See the RMI spec for details.