How to open user system preferred editor for given file?

Seems that if you can’t use java.awt.Desktop you have to distinguish between the OSes:
Windows:

RUNDLL32.EXE SHELL32.DLL,OpenAs_RunDLL <file.ext>

Linux:

edit <file.ext>

Mac:

open <file.ext>

HTH. Obviously, that is not very portable…

Leave a Comment