Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java application's permissions?  RSS feed

 
darine darine
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
I'm trying to learm RMI,so how to access or set up or change or edit your application
persmissions?because I have an exception when i run the server class that creates the remote objects and register them,it says access denied,so i need to know how to set up the permissions for that app.
Thanks for your time.
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's all done with policy files. Alas, there's surprisingly little information at http://java.sun.com that's easy to find on writing policy files. I looked around for a few minutes, and came up empty handed. But play around a little with policytool, a binary that comes bundled with the JDK. You'll at least see what access permissions are understood by the JVM that way.
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some of the security documentation is indeed surprisingly scattered -- I had to it from quite a few places when I was writing the security chapter for BJN (and the editor subsequently tried to cut my tables ).
Assuming you have installed the JDK documentation, you can find
  • information about the security architecture in docs\guide\security\spec\security-specTOC.fm.html.
  • information about the policy file syntax in docs\guide\security\PolicyFiles.html -- the policytool can be pretty hard to use if you don't understand how the policy file works.
  • information about the permissions used in the JDK in docs\guide\security\permissions.html; there's also useful documentation in the permission classes' API javadoc
  • a guide to the policytool in docs\tooldocs\win32\policytool.html
  • If you don't have the JDK documentation installed, click on the links to go to the online copy.
    - Peter
    [ April 12, 2002: Message edited by: Peter den Haan ]
     
    It is sorta covered in the JavaRanch Style Guide.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!