我已经为Mac OS X打包了一个JavaFX应用程序。现在我正在尝试将文件扩展名与sample.app应用程序关联起来。这个是我能找到的最后一个有关此问题的问题,但我无法使其工作。我是否错过了什么新内容?
我已经为Mac OS X打包了一个JavaFX应用程序。现在我正在尝试将文件扩展名与sample.app应用程序关联起来。这个是我能找到的最后一个有关此问题的问题,但我无法使其工作。我是否错过了什么新内容?
Java 8u40新增了一个功能,即允许为OS X本地封装应用程序指定文件关联。该功能是Java客户端打包程序中的新功能。
以下是Oracle Java 8u40客户端应用程序部署文档的内容:
7.3.7 Associating Files with a Self-Contained Application
The installer for a self-contained application can be set up to register file associations for the application. The element is used in an Ant task to identify the files that can be handled by the application. File associations are based on either the file extension or MIME type.
The following example associates the application with files that have the MIME type
application/x-vnd.MyAppFile
.
<fx:info title="Association example"> <fx:association mimetype="application/x-vnd.MyAppFile" description="Sample Test Files"> </fx:association> </fx:info>
Java 8u40实施的相关问题: