Meaningless Drivel is fun!*
The moose likes Distributed Java and the fly likes RMI Security Policy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI Security Policy" Watch "RMI Security Policy" New topic
Author

RMI Security Policy

Shawn Kuenzler
Ranch Hand

Joined: Apr 16, 2006
Posts: 73
The search brought back many loosely related topics but couldn't find this specifically...

So I have an RMI application that works fine when using the below security policy file:



Now I'm ready to deliver it to clients and I'd like to lock it down to the path that the code resides in. The below policy:



Allows the server to start properly, but as soon as a client attempts to connect, the server reports:




So following some of the examples online I also tried the policy:



This one doesn't even allow the server to start. The server reports:



Can someone help explain what I may be doing wrong here? Is there anything else I need to provide to help explain why I'm getting these results? Thanks!!


SCJP 1.5
abhishek jethwani
Greenhorn

Joined: Aug 11, 2006
Posts: 14
do simple thing
run policytool on command prompt.

set 'Allpermissions' in it and save the file in user directory, with name '.java.policy'.

then try to run your server. i think this will resolve your problem
Shawn Kuenzler
Ranch Hand

Joined: Apr 16, 2006
Posts: 73
Thanks abhishek!

This works, but I have a couple concerns.

1) Isn't this process just creating a policy file that supersedes the one I really want to use for my application? .java.policy looks like my wide open security policy I used for testing...



2) I don't want to have customers copy a this policy file to their home directory. I'd rather have my entire application contained within the .jar
Shawn Kuenzler
Ranch Hand

Joined: Apr 16, 2006
Posts: 73
Anyone?
abhishek jethwani
Greenhorn

Joined: Aug 11, 2006
Posts: 14
hi shawn,

for your query i have to code and see, mean while if you get some solution please update me too.

thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RMI Security Policy