Hi Meenasar,
It may be useful to consider using a configuration file, more commonly called a properties file -- using Properties class.
System.getEnv() method is deprecated in Java 1.3.1
Also, since you seem to be using eGate, consider the limitation of using environment variables. Since eWay processes are child processes of the control broker, the environment is inherited in the same way. Therefore, changing enviroment variable will require you shut all components from JMS Servers (IQ Managers) to e*Way all the way to the Control broker.
To use the properties file you may want to enter the following in the collabroation rule "initialization string"
-def <key_value>="D:\eGate\client\tmif01\configs\tmi\BndSvc\Properties\CNX.properties"
In the collaboration rule code:
String propertyFile = System.getProperty(<key_value>);
Then with the location of the property file (in this case CNX.properties) you can use the Properties class to get a the values you need.
It is most common to use this feature within the userInitialize() method of the collaboration rule -- but rememeber that exceptions in this method do not prevent the executeBusinessRule() method from executing -- althgouth workaround exist for that too.
This forum has good help on using the Properties class.
If you need more help, just ask.