wild card characters not excepted in Runtime.exec()
843829Apr 1 2002 — edited Apr 1 2002Hi
When I try to execute a command on solaris using Runtime.exec(), it fails if the commond had wildcard characters. but its successful otherwise. I try the comand first on the prompt before trying thru exec()
e.g.
Runtime r = Runtime.getRuntime();
r.exec( "rm *.c"); //FAILS since it has wildcard
r.exec("rm aa.c");//SUCCESSFUL since no wildcard
I tried this with many commands with and without wildcards and wildcard always failed. exit status is non 0 indicatind a failure.
Please help
Thanks
Sachin