|
-
September 23rd, 1999, 03:43 AM
#1
Java RMI
I am trying to implement the RMI server on the Remote Host. I do it in the following manner :
1) Create the Remote Interface
2) Create a Class that Implements the Remote Interface.
3) Create the Stub and Skeleton Classes (using rmic...)
4) Copy the Remote Interface and Stub File to the Client Host
5) Start Up the remote registry
6) create and Register the Remote Object : When I try to do this procedure I use the following command at the prompt
java ServerDir.MyServerImpl
On execution the exception thrown is
'java.security.AccessControlException : access denied ( java.net.SocketPermission "111.111.111.111" connect, resolve)
(Note : the IP address here is only for understanding)
The Remote object does not get registered. How do I solve this problem ?? Please help.
Thanks
Uma
-
September 23rd, 1999, 12:29 PM
#2
Re: Java RMI
Hi Uma,
You need to create a policy file. Open notepad , and paste the following lines there..
======================
grant{
permission java.security.AllPermission;
};
======================
and save it as policy.txt and put it in your d:\temp directory
then when u run the server , try like this ..
d:\jdk1.2.2\bin\java.exe Djava.security.policy=d:\temp\policy.txt YourServerImpl
If you get any error , Post it.
Poochi...
-
September 25th, 1999, 02:00 AM
#3
Re: Java RMI
Hi poochi,
Your 'policy.txt ' solution worked. However I appended onemore permission to the policy.txt
permission java.net.SocketPermission "localhost:1024-65535","connect,accept";
I found that the default policy.txt did not give the required connections to the port.
Thanks for your help.
Uma
-
September 25th, 1999, 02:21 PM
#4
Re: Java RMI
You are welcome..
poochi..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|