On my System there are two Ethernet Adapter attached. I want to bind
my remote object with particular IP address of Ethernet card .How I can
set IP address to which remote object cab be bind.
Following is the code for binding the object
systemProperties.put("java.rmi.server.hostname", serverAddress);
Registry reg =
LocateRegistry.createRegistry(Constants.RMI_REGISTRY_PORT);
reg.rebind("My Object", remoteobject);
Thanks in Advance.
> On my System there are two Ethernet Adapter attached. I want to bind
>my remote object with particular IP address of Ethernet card .How I can
>set IP address to which remote object cab be bind.
I don't understand quite what the problem is, and the answers to some
of the questions I think you may be asking are platform/router
specific.
If you want simply to find out what ip addresses are assigned to the
current machine, you can use the Java source at
http://mindprod.com/ip.html
called "WhoAmI"
In Windows you can find out such information with the IPCONFIG
utility.
In Windows you can also find out with control panel, Network and
Dialing digging in the TCP/IP protocol section. You will have to
assign a permanent IP rather than using DHCP if you want something
fixed you can talk about elsewhere on your LAN. Instead of using raw
IPs, you can assign host names in your hosts file and propagate that
around the LAN.
See http://mindprod.com/jgloss/hosts.html
If there are people coming in from the outside the LAN, you will have
to configure your router to direct them to the correct ip/port. Again
you will need fixed ips on your servers for that, in the range
192.168.0.1 .. 192.168.255.254 where 192.168.0.1 is usually the
router.
Pretty much any time you can use "http://mindprod.com" in Java you can
also use "http://24.85.32.136"

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
Tim Smith - 25 Oct 2005 04:58 GMT
> > On my System there are two Ethernet Adapter attached. I want to bind
> >my remote object with particular IP address of Ethernet card .How I can
[quoted text clipped - 3 lines]
> of the questions I think you may be asking are platform/router
> specific.
He wants it to listen only on one specific IP address, rather than the
default of INADDR_ANY.
There's discussion of this problem (a very muddled discussion) here:
<http://forum.java.sun.com/thread.jspa?threadID=579134&messageID=2921038>

Signature
--Tim Smith
Roedy Green - 25 Oct 2005 11:44 GMT
On Tue, 25 Oct 2005 03:58:12 GMT, Tim Smith
<reply_in_group@mouse-potato.com> wrote, quoted or indirectly quoted
someone who said :
>He wants it to listen only on one specific IP address, rather than the
>default of INADDR_ANY.
OK, I see now. I figured that part would be easy once he knew the
desired IP.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.