Can a batch file execution step through sequence without completing a java process?

Does a batch file execute processes in sequence only if the previous step has completed and released all file/process locks?

Suppose I have the following cmd file (mybatchfile.cmd)

echo. |TIME
java myjar.jar
echo. |TIME

and I pipe the results to a log file.

Can I be 100% confident (on windows) that my java process has completed and released all file/process locks when the second echo timestamp has occurred?

Answers


If your Java program launches another process then no, you have no control. For the most part it is a reasonable assumption, not 100%

EDIT: Another item that might take a while are server sockets. The sockets might be in a WAIT state for a while before being released by the OS.


Yes, provided java wasn't killed, you can be confident it has completed normally. Regardless, the locks will be released.


Need Your Help

How do I create kanji (Japanese letters) animations from SVG data in Objective-C?

ios objective-c svg kanjivg

I've seen several iPhone/iPad apps that show animated kanji. For those of you who are unfamiliar with kanji, stroke order is a very important part of kanji studying so if you are doing an app showi...

gobject introspection element-type GstStructure

glib kurento gobject-introspection

As per this, I think it is not possible to create GArray using python bindings. To overcome this, I am writing a small library that will return a GArray. This library utilizes gobject introspection...