• Post Reply Bookmark Topic Watch Topic
  • New Topic

Swing & Thread problem

 
Patrick Brahami
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I've got a question.
My application, which is a GUI application using Swing has a bug. I think it involves threads.

My application schedules opening a software on my HD.(using RunTime class) Now, the program is starting to load (vuze) and get 'stuck' while loading, and it continues only when I click on my application on a different tab. (i got some tabs)

How so? How can I prevent it from happening?
Thanks in advance.
[ October 28, 2008: Message edited by: Patrick Brahami ]
 
Darryl Burke
Bartender
Posts: 5154
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you haven't already, read this article.
When Runtime.exec() wont
 
Patrick Brahami
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I've read this article before but it is unrelated to my problem.
I believe my program has to do with the underlying Swing threads.

I have found out that I have to reclick a specific tab for the program to continue loading. Weird.

Anyone had any similar problems? Any idea will be appreciated.
 
Suraj Chandran
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On a releated note (to Runtime.exec)
"....failure to promptly write the input stream or read the output stream of the subprocess may cause the subprocess to block, and even deadlock."
 
Patrick Brahami
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not trying to read or write anything.
Just opening it.
 
Rob Spoor
Sheriff
Posts: 20820
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even then you should read the output and errors of the program. I had the same problem in an application I once wrote, which only converts one file to another. I didn't care about any output. However, sometimes it was hanging.

After reading (and ignoring the contents of) both output and errors the problem was solved.
 
Patrick Brahami
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nope that too doesn't work.
It is funny, if I open bitComet it just opens up.
if I open vuze, it gets stuck at loading window, at the loading torrents part, and after several clicks on my software(changing tabs)
vuze continues to load and opens up perfectly.

It drives me insane.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!