Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!news-1.dfn.de!news.dfn.de!news.informatik.hu-berlin.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Mike Amling Newsgroups: comp.lang.java.programmer Subject: Re: refusal to quit Date: Fri, 29 Aug 2014 12:50:24 -0500 Lines: 18 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net iVfuujTy+eJwejATw9DtVw4gSuRpodPgpwxqm/8GWaMwl18a+k Cancel-Lock: sha1:r88fEH96at9CbUq7mZVNT3Y5wq4= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: Xref: csiph.com comp.lang.java.programmer:29870 On 8/29/14 11:56 AM, Roedy Green wrote: > Sometimes programs simply refuse to quit after main has terminated. > > Sometimes the app is single-thread so I am baffled what it is waiting > for. > > Practically I can make things work by adding a System.exit(0) > as the last thing in main. > > However, I would like to understand what is going on. Is there a way > to shed some light on why a program won't quit? You're sure it hasn't started some other Thread under the covers, e.g. a la Swing? I'd start out with a census of the running Threads. --Mike Amling QnV0IHRoZW4sIHdoYXQgZG8gSSBrbm93Pw==