Donald, please see my post above. The article explains that runtime exec is not a command line (even though it takes a parameter named cmd!). Things like 'dir' are operating system specific, therefore you would have to test whether you are on windows then run the Windows command.exe to execute Windows commands.
The article also explains that there can be problems if you don't empty the buffers of the exec, e.g. if your exec failed and produced an error message it might fill up the buffer and throw a bigger error in your Java. My Home -->
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.