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
system properties, codebaseURL, and .properties
Posted by jason thiel on July 26, 2000 at 9:53 AM
I am relatively new to java and have an odd problem. I have some example code
from a text book that uses a -D command line option to set system properties for
the jvm. I want to eliminate this and include the option in a .properties file.
From the text, I was able to gather that all you have to do to use a .properties file is
to open it and load it in the program. The program is RMI program and I am attempting to
set the codebaseURL property. It works if I forget the .properties file and execute the code as follows:
java -Djava.rmi.server.codebase=http://server/ program_to_execute
1. where can i get information on .properties files? what is appropriate to put in them?
2. Why is it codebase on command line but codebaseURL in .properties file?
3. Do I need to do something other than load the .properties file in order for it's data
to get into the program?
thanks for any help.