• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

security -- policy file

 
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic