Simple (I suppose..) problem with Threads
In the main I do this:
publicstaticvoid main(String[] args){
new MyThread(...).start();
}
In MyThread I do this:
publicvoid run(){
// do something ...
System.out.println("end..");
}
I know that thread reaches the end.. but the program itself doesn't exit.
Have you any idea?
Thanks!
Yes, in the
// do something...
I've a lot of code that operates mainly with the open office libraries and connect to the soffice service. (however I have no GUI)
However I know that the thread reaches the end, because i can see on the console that "println" command..
However the main doesn't finish.
> Yes, in the
>
> > // do something...
>
>
> I've a lot of code that operates mainly with the open
> office libraries and connect to the soffice service.
> (however I have no GUI)
>
> However I know that the thread reaches the end,
> because i can see on the console that "println"
> command..
> However the main doesn't finish.
I asked about GUI since UI components starts the AWT thread, and that thread does not terminate when the other threads terminates. Run the code in a console on windows, and press ctrl + break. That will print a thread dump which shows the threads that are alive.
Kaj
kajbja at 2007-7-13 23:49:54 >
