在JavaFX构建中添加外部jar文件
我开发了javafx应用程序,它使用apache的httpclient JAR来发出http请求 在部署应用程序时,我根据文档使用了winx和Inno设置 我的build.xml文件如下所示:在JavaFX构建中添加外部jar文件,java,deployment,build,javafx,Java,Deployment,Build,Javafx,我开发了javafx应用程序,它使用apache的httpclient JAR来发出http请求 在部署应用程序时,我根据文档使用了winx和Inno设置 我的build.xml文件如下所示: <target name="-post-jfx-deploy"> <fx:deploy width="${javafx.run.width}" height="${javafx.run.height}" nativeBundles="all" out
<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}">
<include name="*.jar"/>
<include name="l${basedir}/${dist.dir}/${lib.dir}/*.jar"/>
</fx:fileset>
</fx:resources>
<fx:info title="${application.title}" vendor="${application.vendor}"/>
</fx:deploy>
</target>
但当生成打包的可执行文件时,它似乎不包含httpjar,因为它会引发异常
如何在构建中添加外部jar文件?在我将以下内容添加到javafx应用程序构建文件中时起到了作用
<fx:fileset dir="dist" includes="lib/*.jar"/>
<fx:platform>
<fx:jvmarg value="-Xmx1024m"/>
<fx:jvmarg value="-verbose:jni"/>
<property name="my.property" value="something"/>
</fx:platform>
<!-- request user level installation -->
<fx:preferences install="false"/>
您的提问和回答:)谢谢。。我遇到了类似的问题,但我通过以下方式解决了它:
希望这会有帮助