When we launch the status panel from the Setup, do not wait till the user exits the status panel to consider that the method processBackgroundTask is completed. If the process did not end after 3 seconds assume that it could be launched. This is done in particular to be able to have a progress icon that is displayed only during the launch of the status panel and not all the time the status panel is running.
| | |
| | | */ |
| | | env.remove("JAVA_BIN"); |
| | | Process process = pb.start(); |
| | | int returnValue = process.waitFor(); |
| | | /** |
| | | * Wait for 3 seconds. Assume that if the process has not exited |
| | | * everything went fine. |
| | | */ |
| | | int returnValue = 0; |
| | | try |
| | | { |
| | | Thread.sleep(3000); |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | } |
| | | try |
| | | { |
| | | returnValue = process.exitValue(); |
| | | } |
| | | catch (IllegalThreadStateException ithse) |
| | | { |
| | | // The process has not exited: assume that the status panel could |
| | | // be launched successfully. |
| | | } |
| | | |
| | | if (returnValue != 0) |
| | | { |