This might be of use to whomever finds this in the future, as this is an old post, and I had trouble finding an answer to this online.
This link talks about several things, but I think you will find the part on opening files with there associated programs with little effort.
http://www-106.ibm.com/developerworks/library/os-ecgui3/
the class of interest is:
org.eclipse.swt.program.Program
java doc located here
ttp://download.eclipse.org/eclipse/downloads/documentation/2.0/html/plugins/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/program/Program.html#launch(java.lang.String)
Of course, this is a solution complements of the Eclipse IDE, so you will have to get the appropriate JAR.
Happy Coding,
Chad Olsen Isom
AFAIK, that's Windows specific. The version of Program.java that I have is very Windows-specific, with a large number of Registry accesses, use of Windows' ShellExecuteEx(), etc. etc.
For other platforms you're going to need to either write native code, use platform-specific bindings provided by the platform's vendor (e.g., Apple), try and issue shell commands and then parse the output, or use a third-party library.