File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Threads and Synchronization and the fly likes main thread not exiting Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply locked New topic
Author

main thread not exiting

subodh gupta
Ranch Hand

Joined: Jul 23, 2007
Posts: 203
Hi All,

I am running one application program, what it has do is:

1) Open input file read it and insert the records in the database
2) So i am using BufferedReader, BufferedWritter and Jdbc
3) I am closing all the resources in the finally block (all checks are done for null...)

Problem is:
The main never exit by itself

Means if i put the
code:
--------------------------------------------------------------------------------

System.exit(0);

--------------------------------------------------------------------------------


line at the end of the main all is doing well otherwise program doesn't terminate.

Has anybody faced this problem?


http://subodh-gupta.blogspot.com
Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
Please do not cross-post the same question in more than one forum. CarefullyChooseOneForum

Everyone, please continue discussion in this thread.


Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.<br /> <br />#:^P
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: main thread not exiting
 
Similar Threads
Problem while using the Eclipse IDE
regarding the main and System.exit
How to close Hibernate C3P0 Connections properly?
Running program written in Java 6 in JRE 1.4.2 Environment
main problem