How to let the Runtime.getRuntime().exec(p) run without waiting for the sleep 10??
Currently its wrong, its waiting until the exec gets complete and then moves to next. Where i need to on the fly let the exec running so that after 10 second later it can kill the PresentationInProjector.jpg.
Example:
Runtime.getRuntime().exec("(sleep 10; echo '09|00|CC|01|83|88' | nc localhost 58888) &");
PlayThisSlideShow("PresentationInProjector.jpg");
According to the docs
exec():So any call to
exec()should not block unless you usedwaitFor()on the returned process of theRuntime.Here is a small example(Exception handling omitted):