JavaFX打包应用程序在MacOSX';应用程序';文件夹

JavaFX打包应用程序在MacOSX';应用程序';文件夹,java,macos,javafx,icons,finder,Java,Macos,Javafx,Icons,Finder,我在MacOSX 10.6上有一个由JavaFX packager打包的Java应用程序;安装后,我有一个很好的图标在查找栏,但不是在“应用程序”文件夹,那里的图标就像在“建设” =>如何更改“应用程序”文件夹中的图标? =>它是一种特殊的“icns”格式,可以在启动时显示应用程序图标,但“应用程序”文件夹不支持这种格式吗 谢谢你的帮助 My build.xml文件: 我还有一个“包”文件夹,其中包含: package/macosx/Info.plist package/macosx/

我在MacOSX 10.6上有一个由JavaFX packager打包的Java应用程序;安装后,我有一个很好的图标在查找栏,但不是在“应用程序”文件夹,那里的图标就像在“建设”

=>如何更改“应用程序”文件夹中的图标? =>它是一种特殊的“icns”格式,可以在启动时显示应用程序图标,但“应用程序”文件夹不支持这种格式吗

谢谢你的帮助

My build.xml文件:


我还有一个“包”文件夹,其中包含:

  • package/macosx/Info.plist
  • package/macosx/MyApp.icns
  • package/macosx/MyApp-background.png
  • package/macosx/MyApp-volume.icns
  • 软件包/windows/MyApp.ico
  • package/windows/MyApp-setup-icon.bmp

能否发布“build.xml”?是的,刚刚添加了build.xml内容和“package”文件夹内容。要使安装程序映像正常工作,它必须与应用程序的名称完全相同。请验证这一点并让我知道。我的问题与“应用程序”文件夹中的图像有关,它类似于“正在构建”的图标,而不是嵌入的图标。我认为在“应用程序”文件夹中,应该使用MyApp.icns,但它不是cas。我怀疑图标在MacOSX 10.9上是否显示良好,但在MacOSX 10.6上是否显示良好。可能吗?
<taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
         uri="javafx:com.sun.javafx.tools.ant"
         classpath=".:${java.home}/../lib/ant-javafx.jar" />


<property name="bin" value="my_private_bin"/>
<property name="main.class" value="my.private.MainClass"/>
<property name="application.title" value="my_private_title"/>
<property name="application.vendor" value="my_private_vendor"/>
<property name="application.version" value="1.0.0"/>


<target name="clean">
    <delete dir="target/package-jar"/>
    <delete dir="target/package-deploy"/>
</target>

<target name="jar">
    <fx:jar destfile="target/package-jar/my_app.jar">
        <fx:application mainClass="${main.class}" name ="${bin}"/>
        <fx:resources>
            <fx:fileset dir="target/libs/" includes="*.jar"/>
            <fx:fileset dir="${java.home}/lib/ext/" includes="sunpkcs11.jar"/>
        </fx:resources>

        <fx:platform javafx="2.1+">
            <property name="user.language" value="fr"/>
            <property name="user.country" value="CH"/>
        </fx:platform>

        <fileset dir="target/classes/"/>

        <manifest>
            <attribute name="Implementation-Vendor" value="${application.vendor}"/>
            <attribute name="Implementation-Version" value="${application.version}"/>
        </manifest>
    </fx:jar>
</target>

<target name="deploy">
    <fx:deploy nativeBundles="all" verbose="true" outdir="target/package-deploy" outfile="${bin}">
        <fx:info title="${application.title}" vendor="${application.vendor}"/>
        <fx:application name="${application.title}" mainClass="${main.class}"/>
        <fx:resources>
            <fx:fileset dir="target/package-jar" includes="*.jar"/>
            <fx:fileset dir="target/libs/" includes="*.jar"/>
            <fx:fileset dir="${java.home}/lib/ext/" includes="sunpkcs11.jar"/>
        </fx:resources>
    </fx:deploy>
</target>