How to implement your security policy in the Java program itself

I am really new to java-RMI and have developed a small application on it. But to start my server and client I need to execute - Java -Djava.security.policy = client.policy

So what should I do for ommite '-Djava.security.policy = client.policy' of this command? Or is there a way to implement a security policy in a java program? Thanks in advance.

+3
source share
1 answer

The policy file is required in the RMI application so that the client can connect to the remote server. You also need to implement securityManager both on the client and on the server. this security manager will allow you to connect to any remote rmi host that the client is intended to connect to. I think the policy file cannot be skipped in RMI. it is required.

0
source

Source: https://habr.com/ru/post/1703953/


All Articles