• Post Reply Bookmark Topic Watch Topic
  • New Topic

Oracle chart builder finish but some threads are still alive ?!?!?!?

 
Ashraf Fouad
Ranch Hand
Posts: 80
  • 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?
Thankx
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you trying to run as a command-line app? (i.e. no GUI) I'm betting that the Oracle chart builder uses some AWT or Swing code that causes the AWT event thread to start. (Those are the other threads that are keeping your program alive...) This is normally a good thing, as it keeps a frame open until the user explicitly closes it. The fix is really easy. Just put a System.exit( 0 ) at the end of your main() method!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!