This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Client startup parameter help please Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Client startup parameter help please" Watch "Client startup parameter help please" New topic
Author

Client startup parameter help please

Kalichar Rangantittu
Ranch Hand

Joined: Jan 15, 2002
Posts: 240
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.


Never be satisfied with anything less than the best and you will surely pass the test...
Reshma Das
Ranch Hand

Joined: Jan 29, 2002
Posts: 125
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

Joined: Jan 15, 2002
Posts: 240
Thanks, does the protocol always have to be rmi?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Client startup parameter help please