Open a file by double click with a program written in java

前端 未结 3 1110
长发绾君心
长发绾君心 2021-01-14 23:15

I want to know if it\'s possible to open a file in my program that is written in java just by doing a double click on the file?

For example: On my desktop is a file

3条回答
  •  执笔经年
    2021-01-14 23:45

    It is the operating system that decides which applications are associated with a given extension. You may configure your OS to open all .dat files with you program if that works for you. Alternatively create a shortcut or a launcher telling what to use.

提交回复
热议问题