This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I'm unable to run jar outside the dist folder. Here is the build.xml I have used. I'm not sure how to add the libraries in the MyProject jar using the build.xml. <?xml version="1.0" encoding="UTF-8"?> <project name="MyProject" default="default" basedir="." xmlns:fx="javafx:com.sun.javafx.tools.ant"> <description>Builds, tests, and runs the project MyProject.</description> <import file="nbproject/build-impl.xml"/> <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="MyProject.jar"/> </fx:resources> <fx:info title="MyProject" vendor="MyProject"/> </fx:deploy> </target> </project>
Please let me know if I missed any information.
The <fx:fileset dir="${basedir}/${dist.dir}" includes="MyProject.jar"/> is missing the dependencies copied into the ${dist.dir}/lib. You need to add them as well: <fx:fileset dir="${basedir}/${dist.dir}/lib" includes="*.jar"/> But better is to use the IDE built in JFX packaging which can be configured in the JFX Project Properties/Build/Deployment. You need to enable "Enable Native Packaging" And after it the JFX Project will have action "Package As" in the pop up menu.