So I want to use the windows tree's command to display the a hierarchy graphical representation of all the files present in a directory.
But when I run the command,
Process cmd=Runtime.getRuntime().exec("tree \"path\" /f /a");
I get this error,
java.io.IOException: Cannot run program "tree": CreateProcess error=2, The system cannot find the file specified
Does java.lang.Runtime.exec(String command)
only work for certain commands?