can't java do this?

i have a text file call abc.txt and when i run my program i want to open it using ms wordpad.how can i do this?Sample code please......
[142 byte] By [chamila1986a] at [2007-11-27 6:24:43]
# 1
Runtime.getRuntime().exec(new String[] { "write", "abc.txt" });~
yawmarka at 2007-7-12 17:43:51 > top of Java-index,Java Essentials,New To Java...
# 2
What about java.awt.Desktop ?
cotton.ma at 2007-7-12 17:43:51 > top of Java-index,Java Essentials,New To Java...
# 3

> What about java.awt.Desktop ?

I'd imagine that could work if the user has set their *.txt file association to WordPad. Otherwise, I suspect it would open with Notepad. But it's not something I've spent any time with, so that's all just speculation.

[EDIT] Just tested... Yep, it's notepad for me, and I haven't bothered registering a different app.

~

yawmarka at 2007-7-12 17:43:51 > top of Java-index,Java Essentials,New To Java...