• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

security -- policy file

 
Mike Yu
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can someone give some links about tutorial in policy file. I searched this forum, there are some examples of policy file, but I don't understand why it should be written in such ways.
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mike,
Let me start by saying: you do not need a policy file. Furthermore, if you are doing one of the new assignments (contractors or hotel) you are not allowed to have a security manager.
OK, now that that is out of my system.
The Sun RMI Tutorial has a note on setting up policy files.
The Sun Quick Tour of Controlling Applets goes into a little bit more detail.
Regards, Andrew
 
Mike Yu
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Andrew,
Thank you for your reply. My assignment is Fligh By Night. I downloaded it in Oct. 2002.
In the instruction, it said the policy file is allowed as command line parameter. When I wrote the remote client, I set security manager: System.setSecurityManager(new RMISecurityManager()). So I have to use policy file.
You said policy file in not needed, do you mean we don't need to set the security manager?
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mike,
If you start the RMI Registry programatically (which means less work for the examiner / less for you to document) and ensure the client code already has the stub files then you will not need to set the codebase or set the security manager.
Actually I guess I should be encouraging you to read up and learn about setting the codebase and the security manager. After all it is more likely that you will use them in real life.
Regards, Andrew
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic