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
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"