wood burning stoves 2.0*
The moose likes Threads and Synchronization and the fly likes java gui freezes after executing action event Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "java gui freezes after executing action event" Watch "java gui freezes after executing action event" New topic
Author

java gui freezes after executing action event

Paul Agola
Greenhorn

Joined: Jul 03, 2012
Posts: 23
i have a java GUI that when a menu item is clicked it will use the runtime.exec method to execute a process and bring up a report. It does that just fine but then it suddenly freezes up and i cannot access anything for a while. I cannot even scroll through the report to analyse the data. The report is shown on an xterm and i am wondering why i cannot do anything after the report is created. 1. My java code that executes the csh script




When i comment out my error checking code everything works fine and the program doesn't freeze up. It has something to do with the inputsream reading an erro message. This is the portion of code that i comment out



it is somehow hanging up when this happens and i dont know why. Can somebody help because i definately need this error checking portion incase anything goes wrong. I have narrowed it down to the while loop. Everything else works normally but as soon as i put the while loop to read from the buffer it freezes up again. Somehow the subprocess is taking too long to temrinate. Here is the code that is not working


Essentially there are no errors in the script because it produces the report so the geterrorstream should be NULL causing the while loop to be ignored but it is not? It seems like it is reading something for a while(hence freezes up).


 
 
subject: java gui freezes after executing action event
 
Similar Threads
Problem with HP UX ia64 while using Process proc = Runtime.getRuntime().exec( command );
error while writing to a file
Redirect output from stderr, stdout to a JTextArea
java.io.IOException: Cannot run program error=2, No such file or directory
who can my question about this code