Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Command RMDIR and Java

807589Oct 13 2008 — edited Oct 13 2008
Hi,

I don't know how to use the DOS command "rmdir" with Runtime...

I tried this :
Runtime.getRuntime().exec("RMDIR /S /Q myDirectory");
but I have this exception :
Exception in thread "main" java.io.IOException: Cannot run program "RMDIR": CreateProcess error=2, The system cannot find the file specified
Java doesn't find program "RMDIR"...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 10 2008
Added on Oct 13 2008
7 comments
691 views