So I'm working in a Swing application guaranteed to run only on Windows systems using Java 1.6 u 7. The users want a help button to launch a local web browser and point to the company's web site.
After reading online and finding that getDesktop.browse() sometimes crashes in that version of Java, I use Runtime.exec("rundll ...") to kick off the local browser with the appropriate web address.
The browser comes up appropriately, but the original Swing application's mouse pointer converts to an hourglass; I can click on the original window and get results but I can't open a new window.
So I create a short thread implementing the Runnable interface and put the Runtime.exec call in that thread; I assume the problem is that the process is interfering with the GUI thread, and putting the Runtime.exec call in a separate thread will clear the problem up. It doesn't work; I still have the hourglass.
I read online that some processes require that their input and error streams be consumed, or they may block; That shouldn't be a problem with internet explorer, but I add two threads to consume those streams; still no change.
I also tried getDesktop().browse() anyway, and in a separate thread, and had the same problem.
Does anyone have any suggestions?