This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Client startup parameter help please  RSS feed

 
Kalichar Rangantittu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need some clarification with the following please:
If our server started at greenhorn.ranchhand.edu,
what would the exact client startup parameter be?
java -DREMOTE_DNS=greenhorn.ranchhand.edu
-jar server.jar.
This would mean I would need to hardcode the "rmi" to get to greenhorn.ranchhand.edu
within my code so that the remote host looks like
rmi://greenhorn.ranchhand.edu.
This restricts it to only the rmi protocol. I am concerend about passing in the "rmi" title to the startup parameter as the protocol is not par of the DNS name. Any clues please help.
 
Reshma Das
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to pass hostname as an input parameter.
i hardcoded port to default port.
so ur code will look like :
"rmi://"+hostname+"/1099";
 
Kalichar Rangantittu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, does the protocol always have to be rmi?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!