I have a Java program that executes Runtime.getRuntime (). Exec ("ls -l"); many times, once for each directory in the system.
My test system contains more than 1000 directories and Runtime.getRuntime (). exec ("ls -l"); it seems an error after 480 directories or so. The error message I get is "Error starting exec (). Command: [ls, -l] Working directory: null Environment: null". I assume that he is running out of some required system resources or not? Is there a way to handle all directories without errors?
Relative comment from the answer:
I must clarify that I used the Android SDK adb.exe. I wanted to execute something like Runtime.getRuntime (). exec ("adb shell ls -l") several times in different directories.
source share