Cross-platform way to open a file using Java 1.5

后端 未结 8 803

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条回答
  •  情话喂你
    2020-12-16 18:46

    We do put the command outside somewhere in the configuration file.

    Your "JAR and source code" will be "cross-platform", but your deployment doesn't.

    You can also do something like this answer. You can put the classname of the factory class of the "Deskop" implementation into the setup file. (may be guide or spring, if you like)

提交回复
热议问题