How to Bind Remote Object particular IP Address

Discussion in 'Java' started by sherazi, Oct 24, 2005.

  1. sherazi

    sherazi Guest

    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.
    sherazi, Oct 24, 2005
    #1
    1. Advertising

  2. sherazi

    Roedy Green Guest

    On 24 Oct 2005 03:05:48 -0700, "sherazi" <>
    wrote, quoted or indirectly quoted someone who said :

    > 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"
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
    Roedy Green, Oct 24, 2005
    #2
    1. Advertising

  3. sherazi

    Tim Smith Guest

    In article <>,
    Roedy Green <> wrote:
    > On 24 Oct 2005 03:05:48 -0700, "sherazi" <>
    > wrote, quoted or indirectly quoted someone who said :
    >
    > > 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.


    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>


    --
    --Tim Smith
    Tim Smith, Oct 25, 2005
    #3
  4. sherazi

    Roedy Green Guest

    On Tue, 25 Oct 2005 03:58:12 GMT, Tim Smith
    <> 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.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
    Roedy Green, Oct 25, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sherazi
    Replies:
    0
    Views:
    432
    sherazi
    Oct 25, 2005
  2. Dinesh P
    Replies:
    2
    Views:
    299
    Jack Klein
    Dec 26, 2007
  3. Giovanni Gherdovich
    Replies:
    3
    Views:
    1,171
    Giovanni Gherdovich
    Aug 28, 2008
  4. ralderton
    Replies:
    0
    Views:
    366
    ralderton
    May 10, 2009
  5. Pokkai Dokkai
    Replies:
    20
    Views:
    237
    Pokkai Dokkai
    Apr 17, 2008
Loading...

Share This Page