The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
July 2000



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.


System properties

Posted by Robert Nordin on December 06, 2000 at 8:17 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("", "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 ***


Sponsored Links

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