in my application, To run the server:
i have to type in this info:
But to run the remote client i just say:
I know when i use codebase, i HAVE to include the policy file and create newRMISecurityManager.
But here are some cases i found:
1. I have a policy file with all permission grants.
2. When i include policy file like this, the application works just fine:
3. when i include newRMISecurityManager like this , the application runs fine:
4. But when i include both the application DOESN'T run. It gives access control exceptions.
5.When i DON'T include either of these, my application runs fine, why?
can someone please explain me?
what should i do now?
I deleted your duplicate post in the other thread with this same question.
You will get better response from this thread anyway.
Please refrain from duplicate posting in the future.
Thanks for the post.
And sorry abt the duplicate post.
Yes, i understand that i don't need codebase etc.,
for the assignment.
I tried taking out codebase and running the same, but it gives STUB NOT FOUND exceptions. I think, i need to put that stub in the classpath? I'll try figuring out that.
But can u still help me with the problem?(just curious :-)
My problem in short again is,
if i use codebase i need to use BOTH policy file and RMISecurityManager.( right?)
But i see i can still run the application WITHOUT these two.
Also if i use EITHER of these i can still run my program fine.
But if i use BOTH of these then i get Access control exeptions. why?
Can u help me in fixing this?
but i wanted to ask, if it was ok or not,
to use codebase to run server and still run the client without setting RMISecurityManager?
I have a policy file, but i don't type it on the command line. I set this from the client program, in the main().
Does this mean, i shouldn't have any policy file, not even the simple, all grant permissions?
And if so, how do i need to justify this in my Design.txt
Originally posted by jyothi sunke:
As Mark said, u don't need policy file, SecurityManager & codebase for this assignment. What u can do is place the stub classs in the client.jar with proper directory hierarchy and make sure to set the classpath to that jar file.
Hope this helps..
Because u can't be 100% sure what is the the tester's environment. What if their default policy file block the port u want to use for RMI? Add a few lines won't kill u anyway. But can make sure things going to work everywhere.