Adding external jar file in JavaFX build


I have developed javafx app which uses httpclient jars from apache for making http requests.

When deploying the application I used winx and Inno setup as per the documentation

My build.xml file is as follows:

 <target name="-post-jfx-deploy">
    <fx:deploy width="${}" height="${}"
       outdir="${basedir}/${dist.dir}" outfile="${application.title}">
    <fx:application name="${application.title}" mainClass="${javafx.main.class}"/>
        <fx:fileset dir="${basedir}/${dist.dir}">                
            <include name="*.jar"/>                
            <include name="l${basedir}/${dist.dir}/${lib.dir}/*.jar"/>              
    <fx:info title="${application.title}" vendor="${application.vendor}"/>

But when the packaged executable is generated it seems not to contain httpjars as it throws exception.

How to add external jar files in the build?,

3/11/2013 2:49:58 PM

Accepted Answer

Worked when I added following to my javafx application build file

<fx:fileset dir="dist" includes="lib/*.jar"/>

    <fx:jvmarg value="-Xmx1024m"/>
    <fx:jvmarg value="-verbose:jni"/>
    <property name="" value="something"/>

<!-- request user level installation -->
<fx:preferences install="false"/>
3/15/2013 11:54:49 AM

you asked and answer :) thanks .. I faced similar problem but I solved it by :

hope that will help ..

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow