Problem opening RMI port other than default
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Matt_Davis
Posted On:   Monday, March 4, 2002 07:32 AM

I am having a problem opening any port other than 1099 for the RMI registry. I have checked that nothing else is using that port so what else could it be?


I am new to RMI so it is probably something I have done wrong, here is a snipit of my code

			
public FooServer implements MyServer
{
java.rmi.registry.LocateRegistry.createRegistry(somePort);
UnicastRemoteObject.exportObject(this);
...
}

The app crashes on the first line. I have not used a RMI Security Manager which I have read about, will this affect which ports I can use?

Thanks,

Matt Davis

Re: Problem opening RMI port other than default

Posted By:   Nick_paule  
Posted On:   Tuesday, March 12, 2002 03:04 AM

Matt I am also new to RMI but I have recently finished an assignment on it. I will try my best to answer your problem.

Try making your own policy file. I have pasted my policy file just use this and see if it makes any difference

IF you look closely u can see a line
java.net.SocketPermission "*:1024-65535", "listen,accept,connect";
permission

this will give your program permission to open any port for you. I guess I am not sure.



grant {



// allows anyone to listen on un-privileged ports
permission java.security.AllPermission;
permission java.net.SocketPermission "*:1024-65535", "listen,accept,connect";
permission java.io.FilePermission "d:\Remote\Server\classes\-", "read";
};

About | Sitemap | Contact