This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
If you will look at the JavaDocs for java.util.Properties, you will see that it has the load( InputStream ), store( OutputStream ) and setProperty( key, value) methods. These take care of 1) and 2) You should not be trying to use the System properties for your specific application. Use a separate properties file. Bill
Originally posted by aakash bhatt: Is it the same used for storing an environment variable.
As far as I know, Java does not support OS environment variables, except via a deprecated method on java.lang.System. It has been deprecated since an early version and may not do anything at all now. Certainly, you should not use it.
You can use platform-specific code to get/set OS environment variables, with JNI.
Anyone know why OS environment variables are unsupported by Java? What platform didn't like them? The concept exists in all DOS/Windows/Unix/Linux/MacOSX.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.