Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Failed to launch JavaFX application with native bundle exe

982844Jan 10 2013 — edited Jan 10 2013
Hi,

I have created a JavaFX application, and created its native bundle using Ant. When I am trying to launch application using Jar from bundle created with double click, it successfully launching my application. But when I am trying double click on MyApplication.exe (say), it throwing JavaFX Launcher Error *"Exception while running Application"*.

I have searched about this issue, I found about jre, so I did replace jre from *"C:\Program Files\Java\jdk1.7.0_10\jre"* to my application bundle folder -- *\bundles\MyApplication\runtime\jre*, then I tried to launch exe with double click, it successfully launched.

I have compared both jre, there are many missing jar, exe, dll and some properties files I found.

I have these environment settings -
JAVA_HOME -- C:\Program Files\Java\jdk1.7.0_10
JREFX_HOME -- C:\Program Files\Oracle\JavaFX 2.2 Runtime
Path contains an entry of C:\Program Files\Java\jdk1.7.0_10\bin 
JAVA_HOME and JREFX_HOME are used as in my build.xml to take ant-javafx.jar and jfxrt.jar --
${env.JAVA_HOME}/lib/ant-javafx.jar
${env.JREFX_HOME}/lib/jfxrt.jar
My steps to create bundle are -
<target name="CreatingExe" depends="SignedJar">
	        <fx:deploy width="800" height="600" nativeBundles="all" outdir="${OutputPath}" outfile="${app.name}">
	       		<fx:info title="${app.title}"/>
	            	<fx:application name="${app.title}" mainClass="${main.class}"/>
	            	<fx:resources>
	                 	<fx:fileset dir="${OutputPath}" includes="*.jar"/>
			 	<fx:fileset dir="${WorkingFolder}/temp"/>
			</fx:resources>
		 </fx:deploy>
 </target>
What more needed in build.xml so that application launch correctly with exe ?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 7 2013
Added on Jan 10 2013
0 comments
713 views