It's not a secret anymore!
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes setting codebase and policy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "setting codebase and policy" Watch "setting codebase and policy" New topic

setting codebase and policy

Kevin Li

Joined: Sep 25, 2001
Posts: 21
I want encode 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

Joined: Dec 14, 2001
Posts: 133
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!
Kevin Li

Joined: Sep 25, 2001
Posts: 21
I have solved it, thanks for your help.
I agree. Here's the link:
subject: setting codebase and policy
It's not a secret anymore!