JavaFX 2.2本机包的问题(exe) [英] JavaFX 2.2 problems with native bundle(exe)

查看:118
本文介绍了JavaFX 2.2本机包的问题(exe)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Javafx 2.2应用程序,当我从netbeans 7.2运行它作为一个jar时运行得很好但是当我创建一个exe并安装exe时,它无法运行并抛出一个execption。

I have a Javafx 2.2 application that runs perfectly when I run it as a jar from netbeans 7.2 but when i create an exe and install the exe, it fails to run and throws an execption.

我没有得到任何日志来知道错误的来源,这只发生在只有exe。

I don't get any logs to know where the error is coming from and this only occurs with only the exe.

下面是蚂蚁目标。

    <target name="-post-jfx-deploy">
    <fx:deploy width="${javafx.run.width}" height="${javafx.run.height}" 
               nativeBundles="exe"
               outdir="${basedir}/${dist.dir}" outfile="${application.title}">
        <fx:application name="${application.title}" 
                        mainClass="${javafx.main.class}"/>
        <fx:permissions elevated="true"/>
        <fx:resources>
            <fx:fileset dir="${basedir}/${dist.dir}"
                        includes="*.jar"/>
        </fx:resources>
        <fx:info title="${application.title}" 
                 vendor="${application.vendor}"/>
        <fx:platform javafx="2.1+">
            <fx:jvmarg value="-Xmx400m"/>
            <fx:jvmarg value="-verbose:jni"/>
        </fx:platform> 
    </fx:deploy>          
</target>

推荐答案

我尝试设置log4j,这样我就可以对内部状态进行一些记录应用程序突然之间错误就消失了。

I tried to setup log4j so i can do some logging of the internal state of the application and all of a sudden the error vanished.

显然这是因为当log4.jar在类路径上或某种程度上但是通过添加时log4j没有正确设置log4j.xml到路径,错误消失了。谢谢你的帮助。

Apparently it was because log4j had not been setup properly while the log4.jar was on the classpath or somehow but by adding log4j.xml to the path, the error has vanished. Thank you for the help.

这篇关于JavaFX 2.2本机包的问题(exe)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆