• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How GUI asks for the name of the RMI server?

 
Michael Remijan
Author
Ranch Hand
Posts: 130
7
Java
  • Mark post as helpful
  • send pies
  • 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.
 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
  • 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.
 
Miguel Roque
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic