• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How GUI asks for the name of the RMI server?

 
Author
Posts: 131
7
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Right now, if I'm running as an RMI client, the first thing I do is pop up a dialog box and ask the user the name of the RMI server. How have other people approached this? I would have figured to pass the name of the server as a command line arguement instead of the database file name but this doesn't match the assignment's specifications.
 
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Michael:

I would have figured to pass the name of the server as a command line arguement instead of the


Why do you want to do it on the command line?
In my project, I popup a window for the user to enter the IP address of the server. The server must be running at the time, or an exception will occurs.
 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.

When you say the name of the server you mention the name that you have assigned to your server when you call the Registry.rebind(name, ServerClass). If it is it, then there is no need for that. What you need to ask is the server IP or name and the port where the RMI server is running.

In my assignment, my server starts and rebind with the name of FBNServer. When the client connects to the RMI server it has the FBNServer hard coded in it so there is no need to ask for the server name. As told before we only need to know the IP and port of the remote server and this is done using a dialog box.

Miguel
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic