I use RMI in my design and create two policy file for client side and server side.
here are the client side policy file:
grant {
permission java.net.SocketPermission "*:1024-65535","connect,accept";
permission java.io.FilePermission
"c:\\server\\exported_classes\\-", "read";
permission java.io.FilePermission
"c:\\client\\exported_classes\\-", "read";
};
here are the server side policy file:
grant {
permission java.net.SocketPermission "*:1024-65535","connect,accept";
permission java.io.FilePermission
"c:\\server\\suncertify\\db\\-", "write";
permission java.io.FilePermission
"c:\\server\\exported_classes\\-", "read";
permission java.io.FilePermission
"c:\\client\\exported_classes\\-", "read";
};
It seems that client must know where the server located its exported classes and the server must know where the client will put the exported classes, right? and it seems I have to setup this way to run the program correcly.
whether I misunderstood sth?