0 Replies Latest reply: Feb 25, 2013 10:40 AM by 885593 RSS

    Problem creating native Windows installer using Netbeans 7.3

    885593
      I’m trying to create a native Windows installer using Netbeans 7.3 for a JavaFX project called JavaFXApp that includes an external jar file using the following –post-jfx-deploy target:

      <target name="-post-jfx-deploy">
      <fx:deploy width="${javafx.run.width}"
      height="${javafx.run.height}"
      nativeBundles="all"
      outdir="${basedir}/${dist.dir}"
      outfile="${application.title}">
      <fx:application name="${application.title}" mainClass="${javafx.main.class}"/>
      <fx:resources>
      <fx:fileset dir="${basedir}/${dist.dir}" includes="JavaFXApp.jar"/>
      <fx:fileset dir="${basedir}/${dist.dir}/lib" includes="commons-io.jar"/>
      </fx:resources>
      <fx:info title="JavaFX App" vendor="Company X"/>
      </fx:deploy>
      </target>

      The problem is that the manifest that Netbeans creates contains a JavaFX-Class-Path that includes sub directory lib in the path (JavaFX-Class-Path: lib/commons-io.jar), but the external jar file is placed directory in bundles/JavaFXApp/app and not in bundles/JavaFXApp/app/lib so at runtime the jar file cannot be found.

      How can I update the process so the JavaFX-Class-Path attribute in the manifest points to the right path?

      Here is the manifest created by Netbeans:

      Manifest-Version: 1.0
      JavaFX-Version: 2.2
      implementation-title: JavaFXApp
      implementation-version: 1.0
      JavaFX-Application-Class: javafxapp.JavaFXApp
      JavaFX-Class-Path: lib/commons-io.jar
      Created-By: JavaFX Packager
      Main-Class: com/javafx/main/Main

      Thanks for your help.
      Stefan