Cross-platform way to open a file using Java 1.5

后端 未结 8 792

I\'m using Java 1.5 and I\'d like to launch the associated application to open the file. I know that Java 1.6 introduced the Desktop API, but I need a solution for J

8条回答
  •  萌比男神i
    2020-12-16 18:44

    Just as an addition: Rather than gnome-open, use xdg-open. It's part of the XdgUtils, which are in turn part of the LSB Desktop support package (starting with 3.2).

    You can (should) still use gnome-open as a fallback, but xdg-open will also work on non-GNOME desktops.

提交回复
热议问题