W
Wesley Mesquita
Hi all,
I am having a problem that in a software that I am developing there is
some ammount of code that invokes console commands (using Runtime
exec). These include directory creation, file compilation and so on.
Following the software flow, most of time I need these created files
immediatally after run Runtime exec and because the system delay they
aren´t ready, so I have to wait until the files have been created. My
poor solution has been an empty loop with a new File object and stay
asking if the files exists (or even worse I thought to put a
Thread.sleep(time)).
My question is: Is there any better solution to deal with this?
Thanks in advance.
I am having a problem that in a software that I am developing there is
some ammount of code that invokes console commands (using Runtime
exec). These include directory creation, file compilation and so on.
Following the software flow, most of time I need these created files
immediatally after run Runtime exec and because the system delay they
aren´t ready, so I have to wait until the files have been created. My
poor solution has been an empty loop with a new File object and stay
asking if the files exists (or even worse I thought to put a
Thread.sleep(time)).
My question is: Is there any better solution to deal with this?
Thanks in advance.