0 Replies Latest reply: Oct 30, 2012 11:07 PM by carcour RSS

    Deployment - Swing App with JavaFX 2.2 content

    carcour
      I have a Swing app in which I'm integrating a JavaFX 2.2 browser. I'm using Java 7 update 9 from Oracle on Mac OS 10.8.2
      I'm using the JavaFX 2.2 ant tasks to generate the native DMG file. The .app file generated is fine, the only issue I have is that the first menu has the label About Main instead of having About MyApp.
      Does anyone know what should be done to solve that.
      Here's my ANT build file.

      <project name="MyApp" xmlns:fx="javafx:com.sun.javafx.tools.ant">

           <property name="javafx.sdk.path"
                value="/Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home/" />
           <taskdef resource="com/sun/javafx/tools/ant/antlib.xml" uri="javafx:com.sun.javafx.tools.ant"
                classpath="${javafx.sdk.path}/lib/ant-javafx.jar" />

           <target name="deploy">
                <fx:jar destfile="lib/BloomFX.jar">
                     <fx:application mainClass="ca.antaki.MyApp" id="Bloom" />
                     <fx:resources>
                          <fx:fileset dir="lib" includes="*.jar" />
                     </fx:resources>
                     <fileset dir="bin">
                          <include name="**" />
                     </fileset>
                     <!-- Customize jar manifest (optional) -->
                     <manifest>
                          <attribute name="Implementation-Vendor" value="Samples Team" />
                          <attribute name="Implementation-Version" value="1.0" />
                     </manifest>
                </fx:jar>

                <fx:deploy verbose="true" width="800" height="600" outdir="dist-web"
                     outfile="SwingInterop" nativeBundles="all">
                     <fx:info title="Swing Interop" />
                     <!-- Mark application as a Swing app -->
                     <fx:application id="Bloom" mainClass="ca.antaki.MyApp"
                          toolkit="swing" name="MyApp" />
                     <fx:resources>
                          <fx:fileset dir="lib" includes="*.jar" />
                     </fx:resources>
                </fx:deploy>
           </target>
      </project>

      Edited by: carcour on Oct 30, 2012 9:07 PM