File association in Mac

前端 未结 2 1000
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-24 07:28

Finding help from here we are now able create a Mac application from a jar file and associate the application with certain file extension .

When double click a file with

相关标签:
2条回答
  • 2021-01-24 07:48

    Apple provides some specific classes that allow you to better incorporate Java applications into Mac OS X. Google for "Apple Java eawt", or try this link: http://developer.apple.com/library/mac/documentation/Java/Reference/JavaSE6_AppleExtensionsRef/api/com/apple/eawt/package-summary.html. Look especially for the Application- and ApplicationAdapter-Class (reps. their not-deprecated parts). you can register special listeners to get the information about files that should be opened.

    0 讨论(0)
  • 2021-01-24 07:54

    Use Java Web Start to declare the interest in that file-type. Here is a demo of the JNLP file services that associates the .zzz file-type with the app. This approach should work for OS X (& Windows, & *nix).

    0 讨论(0)
提交回复
热议问题