how to get environmental variable from JAVA program
hey! guys
I have an application in java servlets, which uses one IP address. so, everytime i run it on different machine in my LAN, I have to replace the IP address in source code and recompile the entire appication. I don't want this mess. so, all I need is just to declare one environmental variable in my application's configuration file and export that variable to all processes that starts from that point onwards(i.e.the point where my application starts.) but I don't know how to get that envireonmental variable value into my program.(exactly what we have getenv() function in C). so, help me in getting getenv() kind of stuff in JAVA. very Urgentttttttt.................................please. |
I don't know anything of java but I have seen my friend using System class to access env vars. I have seen him using System.getProperty to do that.
--Sarin ( He told me that it is in offical java tutorial -> essentials -> system ) |
Re: how to get environmental variable from JAVA program
Quote:
|
All times are GMT -5. The time now is 01:13 AM. |