javafx-2javafx

Cant Run Java FX Executable Jar or Native Bundle


I have created a java fx application on Netbeans 7.3.1 with fxml,hibernate. It works fine when run in Netbeans and when run the jar file from dist folder. Database operations are just fine. But I want export the app to another system in a portable form. So i created the native bundle using the tools Wix and Inno 5. But the produced app doesnt work in my own syntem or another system. Shows Exception while runnig application. I checked several times by changing the db ip address as localhost, 127.0.0.1 and my my physical ip. but no working. My java version is Java 7 update 40 (jdk1.7.0_40)

This is the link for the screenshot showing error : https://i.sstatic.net/mDWly.jpg

my build.xml contains

<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>

And my hibernate cfg file contains

<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>

Is there any extra configuration for the application to work independently??


Solution

  • I got it fixed... All i need to do was include the lib folder in the build... My bad.