• Post Reply Bookmark Topic Watch Topic
  • New Topic

java.policy inside code  RSS feed

 
Fernanda Silveira
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I put the parameter "-Djava.security.policy=java.policy" inside my code besides calling it in the command line?
I use: "java -Djava.security.policy=java.policy MyServer"
But I want to do just: "java MyServer"
And then put the "policy" code inside the class MyServer.
Any ideas?
Regards,
Fernanda Silveira
fe@inf.ufsc.br
 
Chris Shepherd
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think that you can. The whole idea of a security policy is that it is external to the code so that a malicious coder would be limited to only what the security policy allowed. You know, you don't HAVE to use a security policy for your RMI server. Especially if you are just learning it, leaving it out makes it easier.
HTH
Chris
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!