This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Need hel;p: How to close a batch script from a java app.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
My cellmate was this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!