Get the System properties and set the variables you want to set. Properties prop = System.getProperties(); prop.put(key, value);
Hope this will help you. Aruniima Chakrabarti wrote: > How Can I set environment variables using Java code?? > > Regards, > aruniima > > ---------------------------------------------------------------------------- > > This message contains privileged and confidential information and is > intended only for the individual named. If you are not the intended > recepient you should not disseminate, distribute, store, print, copy or > deliver this message. Please notify the sender immediately by e-mail if you > have received this e-mail by mistake and immediately delete this e-mail from > your system. > > E-mail transmission cannot be guaranteed to be secure or error-free as > information could be intercepted, corrupted, lost, destroyed, arrive late or > incomplete, or contain viruses. The sender therefore does not accept > liability for any errors or omissions in the contents of this message which > arise as a result of e-mail transmission. If verification is required > please request a hard-copy version. > > -------------------------------------------------------------------------- > > =========================================================================== > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
