gpt4 book ai didi

macos - 将文件扩展名与 JavaFX Mac OS X 应用程序相关联

转载 作者:行者123 更新时间:2023-12-02 03:28:04 27 4
gpt4 key购买 nike

我已经为 Mac OS X 捆绑了一个 JavaFX 应用程序。我现在正尝试将文件扩展名与 sample.app 应用程序相关联。 This这是我能找到的关于此事的最后一个问题,但我无法让它发挥作用。有没有我遗漏的新东西?

最佳答案

为 OS X native 打包应用程序指定文件关联的能力是 Java 8u40 中添加到 Java 客户端打包程序的新功能。

来自Oracle Java 8u40 client application deployment documentation :

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 实现的相关问题:

关于macos - 将文件扩展名与 JavaFX Mac OS X 应用程序相关联,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29234554/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com