Java Runtime executing problem
Hi all,
I have a problem when getting runtime to execute a string.
String verify_user_cmd="ldapsearch -h host.com -b \"ou=People,o=host.com,o=SDS\" uid" +GID +" cn |tail -1|cut -d= -f2";
I have verified that the string appeared as what I wanted(by using println to check the string), but when I performed the following:
Process p = Runtime.getRuntime().exec(verify_user_cmd);
BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
System.out.println(br.readLine());
It returns null though I am able to execute the command successfully (with expected result) directly from the unix command prompt.
Any help is greatly appreciated.
Thanks,
Eugene

