Java: Start RMI Server using Specific IP Address
By admin on Mar 9, 2008 in Java, Programming
Here is a simple thing which caused me problem for quite awhile..
I need to run on RMI client on Server A with IP address X which connects RMI server on Server B which is multi-homed, meaning it has multiple IP addresses. When the RMI server starts on Server B, it binds to IP address Y but Server A is only allowed to connect to IP address Z since they are separated by firewall.
To resolve this is simple, when I start the RMI server on Server B I need to tell it to explicity bind to IP address Z. This can be achieved by using the java.rmi Properties “java.rmi.server.hostname”.
E.g. before starting my RMI server, I can set the IP address that I want to bind to explicity.
System.setProperty("java.rmi.server.hostname", "x.x.x.x");
ramin | Jul 3, 2009 | Reply
I want sending a text to server or another client of my PC . but i don’t know? pleaze help me