I have a Java program started by a batch file. When the Java program ends, the batch file looks for an update.bat. If update.bat exists, we run it, erase it and restart the Java program. Otherwise we exit. Would something like that work for you?
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi