[BF] fixed wrong return value of java process when running a directory