Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2006

Tip: Looking for answers? Try searching our database.

rmi lookup name can't use hostname?

Thread view: 
cnwy@263.net - 17 Mar 2006 05:30 GMT
Hello,All.

  I can get the rmi remote object by below code:
    String name = "rmi://192.168.1.248/RMIExport";
    RMIExportRemote remote = (RMIExportRemote) Naming.lookup(name);
  But failed when I change IP to hostname.
    String name = "rmi://rt_server/RMIExport";
    RMIExportRemote remote = (RMIExportRemote) Naming.lookup(name);
  I have put a entry in hosts and ping rt_server return 192.168.1.248.
  It seems rmi can't translate hostname into ip address.
 

wy.
cnwy@263.net - 17 Mar 2006 10:57 GMT
It is really strange,
When I put
192.168.1.248   www.google.com
into C:\WINNT\system32\drivers\etc\hosts
and try
       String name = "rmi://www.google.com/RMIExport";
       RMIExportRemote remote = (RMIExportRemote) Naming.lookup(name);
it runs very well.

wy.
Chris Uppal - 17 Mar 2006 12:18 GMT
>    I have put a entry in hosts and ping rt_server return 192.168.1.248.
>    It seems rmi can't translate hostname into ip address.

I can't be bothered to check the standards myself, but I have a vague memory
that _ is not allowed in hostnames.

   -- chris


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.