RMI invoking problem

M

Maciej Gawinecki

Hello

(platform: java 1.4.2.01, Mandrake 7.0)

I'm writing RMI application and I stucked in one moment:
after lanching server-side part:

$ java program

I get AccessControlException
(in line responsible for binding name of method:

Naming.bind("//127.0.0.1/method");

) with message:

java.net.SocketPermission 127.0.0.1:1099 connect,resolve

So, I've written policy file in my project's dir:

grant {
permission java.net.SocketPermission "127.0.0.1:1099",
"connect, accept";
};

and then, in shell:

$ cd $HOME/project
$ java -Djava.security.manager=$HOME/project/policy program

but I get:

Error occurred during initialization of VM
java.lang.InternalError: Could not create SecurityManager:

what's wrong? thnx in advance for your help

Maciek
 
E

EJP

Change .manager to .policy; you've got two properties mixed up. You
*also* need to define java.security.manager but without a value.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

RMI & connection refused 10
RMI connection refused 14
RMI - at my wits end 3
Security problem in Tomcat 5.5 0
JAVA RMI register problem 12
RMI, Firewall and big problem 1
policy file 0
RMI security policy 11

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top