• Post Reply Bookmark Topic Watch Topic
  • New Topic

Killing Threads  RSS feed

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I'm using oracle chart builder for presenting data in my
application. I use it after supplying its data for gif file
generation. The chart is stacked bar but I don't think this is the
problem.
The problem is that it generates the gif file successfully but my
application is still running after the main method is finished, I
debugged it and I found about three threads are up:
Thread[AWT-EventQueue-0]
Thread[SunToolkit.PostEventQueue-0]
Thread[AWT-Windows]
I doubted my code - but I'm taking it copy paste from developer's
guide - and I debugged another Java file from a sample that comes with
the kit and the same problem happened ?!?!?
Does anyone know y?
I saw lots of SunToolkit.PostEventQueue-0 problems in google
groups, but I don't find matching my situation.
I used in testing both Oracle JDeveloper 9i release 3, and IBM
WebSphere Studio Application Developer 4.0.3
Thanks
 
Salman Yasser
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I couldn't use System.exit(), because I am working in a periodical robot ( using Timer and TimerTask ) so exit will exit all application while I want to kill active threads of current task only.
 
Ranch Hand
Posts: 1170
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ahh, a perfectionist Don't worry about those GUI threads. Once you start them, you can not get rid of them sans exit(). Some consider it a problem, but c'est la vie.
Your code and program are working correctly.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!