java - Unable to set env vairables using runtime.exec -


i have execute unix command java program , prior executing command, need set env variables.

but unable set env variables because of unix command not success.

here code snippet:

string[] cmd=new string[] {                 "/u01/idmtop/products/dir/oid/bin/ldapmodify",                 "-h ",                 oid_host,                 "-p ",                 oid_port,                 "-d ",                 oid_user,                 "-w ",                 oid_password,                 "-c ",                 "-v ",                 "-f ",                 filename};          string[] envp = new string[] {                 "oarcle_home=" + "/u01/idmtop/products/dir/oid",                 "instance_home=" + "/u01/idmtop/config/instances/oid1" };         system.out.println(cmd);         try {             process p;             p=runtime.getruntime().exec(cmd, envp); 

you should start setting proper variable, oracle_home , not oarcle_home :)


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -