java Runtime.getRunTime().exec & wildcards?

后端 未结 5 1250
余生分开走
余生分开走 2020-11-30 08:21

i\'m trying to remove junk files by using

Process p = Runtime.getRuntime().exec();

it works fine as long as i do not use wildcards, i.e. th

5条回答
  •  春和景丽
    2020-11-30 08:42

    1. Use exec( String [] { cmd , arg1 , arg2...)

    2. Here's a full example to get the result as a String : Link.

提交回复
热议问题