getting path to application associated with file type
Hello,
I'm looking for a platform-independent way to get path to application associated with given file type. Desktop API introduced in JSE 1.6 seems to do this, but it only lanuches the app.
Any suggestions will be apprecieted
> Okay then, how can I open the file in it's associated
> application AND get the Process object of app's
> instance?
If it doesn't bother you that the app will only work on windoze, then you can use the shell "start" command on the file.
Process proc = Runtime.getRuntime().exec(new String[]{"cmd", "/C","start",filePath});
However waitFor() will only wait for the process to be launched, not completed. Since your program doesn't know what Windoze will choose to launch, this makes sense.