• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

last minute question

 
Kuan Fan
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
Before i upload, i review my assignment, I found that sun just let us input the following parameters:
1 DNS name of the server
2 Port number used by the server
3 Data file name
4 java.rmi.server.codebase
5 security manager policy file
But when i start my RMI client, i need the URL of the remote server object, like below:
java -Djava.security.policy=d:\FBN\client.policy suncertify.client.MenuMain rmi://localhost/serviceFactory
I don't the whether the "rmi://localhost/serviceFactory" is "DNS name of ther server"
I'll upload soon. please help! thanks!
stephen
 
Amund Frislie
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Strictly speaking, the DNS name is the name of the server only (e.g. 'localhost'). In my application I only ask for the DNS name and then use that argument to build the lookup string (together with port number if given). Taking your example, I'm sure there's no problem in hardcoding, like the following:
"rmi://" + dnsName + "/serviceFactory"
 
Mathew Sam
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I completely agree with Amund .
 
Kuan Fan
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Amund and Mathew,
I'll modify it as you said.
thanks again!
stephen
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic