Need hel;p: How to close a batch script from a java app.
Joined: Oct 20, 2003
A client of mine has a problem, they have a batch script ( see below) that launches an app ( abc.exe ) then a series of jars, and finally java app ( java.Application ). Problem is that when they exit the abc.exe, the batch script does not close unless the Ctrl C and say Yes to end batch job. Does anyone have any ideas how to overcome this? batch script follows : :BEGIN start /d "c:\Program files\abc" /b abc.exe C:\j2sdk1.4.2_01\bin\java -classpath class_path=".; C:\Program Files\abc\abc\src; C:\Program Files\abc\abc\lib\mail.jar; C:\Program Files\abc\abc\lib\activation.jar; C:\Program Files\abc\abc\lib\ftpbean.jar" java.Application :END Thanks neil
Joined: Jan 29, 2003
I was going to suggest putting EXIT at the end of the batch file, but if you have to Ctrl-C to break something, it'll never get to the EXIT either. Something that is being started in those jars must have threads that never end, or at least not in the time you're willing to wait. Do these things all talk to each other? Sockets or something? You might have to coordinate shut-down between them all. Can you get them all into one JVM with a driver that starts all the other things and shuts down the VM clean at end? [ October 20, 2003: Message edited by: Stan James ]
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