Javafx 2 无法运行Java FX可执行Jar或本机捆绑包
我已经在Netbeans 7.3.1上创建了一个java fx应用程序,使用fxml,hibernate。在Netbeans中运行和从dist文件夹运行jar文件时,它工作正常。数据库操作很好。但我想将应用程序以便携形式导出到另一个系统。因此,我使用工具Wix和inno5创建了本机包。但是制作的应用程序在我自己的系统或其他系统中不起作用运行应用程序时显示异常。我通过将db ip地址更改为localhost、127.0.0.1和我的物理ip进行了多次检查。但是没有工作。 我的java版本是java 7更新40(jdk1.7.0_40) 这是显示错误的屏幕截图的链接: mybuild.xml包含Javafx 2 无法运行Java FX可执行Jar或本机捆绑包,javafx-2,javafx,Javafx 2,Javafx,我已经在Netbeans 7.3.1上创建了一个java fx应用程序,使用fxml,hibernate。在Netbeans中运行和从dist文件夹运行jar文件时,它工作正常。数据库操作很好。但我想将应用程序以便携形式导出到另一个系统。因此,我使用工具Wix和inno5创建了本机包。但是制作的应用程序在我自己的系统或其他系统中不起作用运行应用程序时显示异常。我通过将db ip地址更改为localhost、127.0.0.1和我的物理ip进行了多次检查。但是没有工作。 我的java版本是java
<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="*.jar"/>
</fx:resources>
<fx:info title="${application.title}" vendor="${application.vendor}"/>
</fx:deploy>
</target>
我的hibernate cfg文件包含
<hibernate-configuration>
<session-factory>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/sample?zeroDateTimeBehavior=convertToNull</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">root</property>
<mapping resource="entity/Sample.hbm.xml"/>
</session-factory>
</hibernate-configuration>
org.hibernate.dialogue.mysqldialogue
com.mysql.jdbc.Driver
jdbc:mysql://localhost:3306/sample?zeroDateTimeBehavior=convertToNull
根
根
应用程序是否有任何额外的配置可以独立工作???我已将其修复。。。
我所需要做的就是在构建中包含lib文件夹。。。我的坏。我把它修好了。。。
我所需要做的就是在构建中包含lib文件夹。。。我的错误。在命令行上运行它以获取异常的详细信息。如果它是一个JAR,请转到它的目录并运行:java-JAR在命令行上运行它以获取异常的详细信息。如果它是一个JAR,那么转到它的目录并运行:java-JAR