Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

setting codebase and policy  RSS feed

 
Kevin Li
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want encode java.security.policy and java.rmi.server.codebase info into my java code,
how do I implement that.
Is it right, using System.setProperty().
 
Enrico Mannarino
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Something like this:
Properties props = System.getProperties();
String rmiServerCodebase = props.getProperty("java.rmi.server.codebase");
I have a class called PropertyReader that reads all the system properties I'll need.
Hope it helps!
Enrico
 
Kevin Li
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Enrico,
I have solved it, thanks for your help.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!