This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

about the rmi

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,everyone:
I use the codes follow:
Client:

Server:

when ip="127.0.0.1",is OK;
when ip="my host name",it throws not found exception.
how to use both ip and hostname for lookup the remote object?
can I use above codes for assignment with Submissions?
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your problem is because you have forced your RMI services to 127.0.0.1.

In fact, you do not need to specify the IP and protocol of RMI registry.
You can do this simply by:

Then, you can connect to the RMI server using both IP and hostname (if you can resolve the hostname by either DNS or network mapping file)
Hope this help.
Nick
[ December 19, 2003: Message edited by: Nicholas Cheung ]
 
Jofer Chan
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,Nicholas :
thank you.
I modify follow:

it registry ok,
but lookup occur exception:
Unknown host: rmi://127.0.0.1:2010; nested exception is:
java.net.UnknownHostException: rmi://127.0.0.1:2010
get me a help.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess you have a bit misunderstanding about RMI.
RMI Registry is only used in Server side.
In Client side, if you want to look up the RMI services in your network, you need:

Hope this help.
Nick.
[ December 19, 2003: Message edited by: Nicholas Cheung ]
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic