How to tell if a process is running?

No, not invokeLater. That runs a function on the gui thread, too. See this topic: