Opening files

I’ve been working on a rather extracurricular project (it’s not really a game at all) for managing files. Is there a way to open any File in the correct program, just by specifying the filename extension and letting the computer do the rest of the work? My current model requires that you find the correct program in a file chooser the first time you open that extension, and then opening it using the following:

Runtime.getRuntime().exec(program+" "+file.getAbsolutePath());

However, the person commissioning me to create this project says that that would be inacceptable. How can you access the filename extension-to-program association that I know the computer has?

rundll32.exe url.dll,FileProtocolHandler

That will also open urls in the user’s default browser. An URL pointing to a local file in MS-land can look like this:
file:///C:/foo/bar/foobar.txt

for Program file association, it must be something like a MimeType Registry…

Well, yea… thats what that rundll32 call does for you. shrug