The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
July 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

System properties

Posted by Robert Nordin on December 06, 2000 at 8:19 AM

> from a text book that uses a -D command line option to set system properties for the jvm. I want to eliminate this
>I am attempting to set the codebaseURL property

I would do it directly in the application code (the server)

Properties prop = System.getProperties();
// *** The location of the policy file ***
prop.put("java.security.policy",
"file:/C:\\Java\\bankserver\\server.policy");

// *** The location of the .class files ***
prop.put("java.rmi.server.codebase",
"file:/C:\\java\\bankserver\\classes/");

// *** Set the properties to the system ***
System.setProperties(prop);


// This is how I do it at least





Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us