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

RMI help! access denied problem  RSS feed

 
Nancy Lee
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My system is Microsoft XP Professional. I am trying to run three different samples of RMI program (One of them is from Sun). When I tried to run the RMI Server, all of them gave me the same error message.

1. I followed the instructions to get all the files ready to run.
2. Start the HTTP Server (ClassFileServer, which I downloaded from SUN).
3. Start the rmiregistry on port 1099.
4. Start the RMI Server. Here I always got this error message:
java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve)
I tried many different suggestions to fix policy file, but no use. Through reading some posted messages about this problem, I guess that I don't have authorization to talk to rmiregistry (which runs on port 1099). My system is XP professional.
Any help is appreciated. Thanks.
 
Marco Barenkamp
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You do not have the permissions for your actions( defined by a policy file).
Start the "policytool" (simple by typing policytool in a dos box)
Assign "AllPermissions" to the policyfile that you have to store
<user_home>/.java.policy
This should work.
 
Nancy Lee
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Marco. It is working now.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!