javapackager native windows bundle non empty app.classpath (package.cfg)

Stefan Kreutter openjfx-dev at
Mon Oct 6 20:13:38 UTC 2014

Hoping to address my question to the appropriate list...

Is it possible to use the javapackager (ant-tasks) to create a Windows exe and having the app.classpath property of package.cfg populated? I use something like this:

<fx:deploy nativeBundles="all" outdir="${basedir}/${dist.dir}" outfile="${application.title}" verbose="true" width="600" height="400">
    <fx:application name="${}" mainClass="${javafx.main.class}"/>
        <!-- include dependencies copied by the maven-dependency-plugin -->
        <fx:fileset dir="target/dependency" includes="*.jar" type="jar"/>
    <fx:info title="${application.title}" category="${}" vendor="${application.vendor}" copyright="${application.copyright}">
        <fx:icon href="${application.icon}"/>

The directory target/dependency contains several jar files (which by the way end up properly in the generated JNLP file) but only the jar file of the main class is references in the package.cfg inside native/bundles/${application.title}/app/package.cfg:

app.mainclass= org/example/demo/app/DemoApp

In the source code of java/com/sun/javafx/tools/packager/bundlers/ I found the following comment:

> private void writePkgInfo(Map<String, ? super Object> params, File pkgInfoFile) throws FileNotFoundException {
>    [...]
>   //This will be emtry string for correctly packaged JavaFX apps
>   out.println("app.classpath=" + MAIN_JAR_CLASSPATH.fetchFrom(params));
>    [...]
> }

So it seems that having a classpath with <fx:deploy> besides the main JAR is not possible/wanted.

Thanks in advance,

More information about the openjfx-dev mailing list