I need my java code to open a file based upon the default application. Thanks to How to open user system preferred editor for given file? which suggests a quality method to do it by
Runtime.getRuntime().exec("RUNDLL32.EXE SHELL32.DLL,OpenAs_RunDLL "+file);
But the issue is that, once I select the application to open it up, it doesn't open the file. I do not know the reason for it.
Thanks
EDIT:
Desktop.getDesktop().open(file);
This opens in default application. I want the user to choose the application to open it up