Thursday, December 4

RMI Server API access on a Virtual Private Network (VPN)

When the Remote Server RMI API is accessed from a client on a Virtual Private Network (VPN), the VPN assigns an IP address to the RMI client machine. This VPN-assigned IP address needs to be specified in an RMI Java system property. If the RMI client is the Remote , then this property can be set by adding the following line to the java command.

-Djava.rmi.server.hostname=<IP_address>

Where IP_address is the VPN-assigned IP address.

If the RMI client is a custom Java program, then this property can be set from within the Java code in the following way:

java.lang.System.setProperty("java.rmi.server.hostname", "IP_Address"); 

Where IP_address is the VPN-assigned IP address.

Please note that the RMI Java system property needs to be set before any RMI Server API related RMI code.

0 comments: