I am helping a colleague set up some GUI programming tools I have written in Java.

I need to "open", "start" or "launch" a document using Java System.exec(). For example, I want to open some text file in the default editor, possibly positioned at line 20, column 50. Or I want to start the default browser and display a particular HTML page.

What's the right way to do this?