Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: opening isdn connection with external file Date: Wed, 29 Feb 2012 10:06:54 -0800 Organization: albasani.net Lines: 68 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net DIUSVAu/RZU6nHIzsLZKwFyTG/KhKYbqML1dZ+1BUt04y4uibS1bwkl2743LIKaMldH4Z1hUR+RkpYyYq7pruVJUjBjsIQCvHWjRGQbOj1CB13IitiCAtpC/C5fY2pib NNTP-Posting-Date: Wed, 29 Feb 2012 18:06:55 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="m+pX0vSkakFHL+6WLlGBz6VDJ6EfLUBHtognp31i4N1P5TBDiPQVIsqP0bL1DFT88fGNzoDki/DGBBYLljkln6+N1VPojnjKd8bDe2rEdjdE1Ej+XZZbfKlvT/UniDz5"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 In-Reply-To: Cancel-Lock: sha1:rFAlUpAmZVf4/pcyB7+Pv+Zi4kE= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:12541 nescafe wrote: > Lew wrote: >> nescafe wrote: >>> Lew wrote: >>>> nescafe wrote: >>>>> OK. >>>>> I do have one more question. >>>>> If i open isdn connection and directly after that i open some data >>>>> logger i >>>>> can not close the same isdn connection ** automatically** on data >>>>> logger >>>>> closing. Basicaly, i close data logger program but isdn connections is >>>>> still >>>>> connected. >>>>> >>>>> Shortly: >>>>> open isdn connection >>>>> open datalogger >>>>> close datalogger >>>>> close isdn connection. >>>>> >>>>> When program starts, he opens isdn and when i X-it the datalogger, >>>>> isdn should >>>>> be closed and not before. >>>> >>>> Wrap the datalogger part in a 'try{}' and close the ISDN in the >>>> 'finally{}'. >>>> >>> ----------- >>> i can not do this beacuse im using bat file to do this: >>> cd.. >>> cd prog >>> cd cms >>> cms.exe >>> >>> I didnt implement this into code. >> >> Oh, well. >> > --------- > :-) The runtine calls file test.bat > This file has all that i need. > Can you give suggestion how to solve my problem using .bat file ? I can't speak for everyone here, but no. You are going about the whole thing bassackwards. I can give Java insight here in this Java newsgroup. I do have two observations: - Coordinating logic within a program from outside that program without the program having hooks for such control is likely not feasible at all. - Running a Java program as a system-specific artifact, and black box at that, is not the highest, best use of Java. My advice is to "implement this into code", as you put it. If you need Windows advice, as you indicate that you do, this is the wrong newsgroup. comp.lang.java.programmer is a discussion group (not helpdesk) for Java programming topics. You appear unwilling to discuss Java. -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg