JavaFX packaging fails

I have a simple JavaFX project that I would like to package as a Windows image, but when I try to build it I get 3 errors:

Error:Java FX Packager:
BUILD FAILED
C:\Users\Dave\.IntelliJIdea13\system\compile-server\_temp_\build3433150011334981496.xml:11:


Total time: 0 seconds

Error:Java FX Packager: Buildfile: C:\Users\Dave\.IntelliJIdea13\system\compile-server\_temp_\build3433150011334981496.xml


build artifact:
Error:Java FX Packager: fx:deploy task has failed.


I end up with an executable jar that runs correctly, but no bundled jre and exe.  If I build the project on Linux I can create a Linux image without any problems.
I'm using IntelliJ IDEA 13.1.4 build # IU-135.1230 with an evaluation license on Windows 8.1.
3 comments
Comment actions Permalink

according to http://docs.oracle.com/javafx/2/deployment/self-contained-packaging.htm you need to have

  • Inno Setup 5 or later

do you have it on your system? If so, can you generate ant script (Build|Generate ant) and check if you can generate .exe with it?

Thanks,

Anna

0
Comment actions Permalink

Inno Setup should only be needed for a native installer, not for an image.  I can create an image from NetBeans without any trouble, and in IntelliJ I've double checked that the native bundle option is set to image, not exe.  I also tried all, just to see if something would work.   I'll give Inno a try to be sure though.

I generated an Ant script which also failed, but this time I got a more helpful error message (I get the same error 3 times):

C:\Users\Dave\Bitbucket\friendly_vengeance\14-05_versant_presentation_builder\14-05_versant_presentation_builder.xml:135:
 at com.sun.javafx.tools.ant.FXJar.execute(FXJar.java:152)
 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
 at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:483)
 at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
 at org.apache.tools.ant.Task.perform(Task.java:348)
 at org.apache.tools.ant.Target.execute(Target.java:390)
 at org.apache.tools.ant.Target.performTasks(Target.java:411)
 at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
 at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
 at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
 at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
 at org.apache.tools.ant.Main.runBuild(Main.java:809)
 at org.apache.tools.ant.Main.startAnt(Main.java:217)
 at org.apache.tools.ant.Main.start(Main.java:180)
 at org.apache.tools.ant.Main.main(Main.java:268)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:483)
 at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:30)
Caused by: java.lang.IllegalArgumentException:
 at java.util.jar.Attributes$Name.<init>(Attributes.java:464)
 at com.sun.javafx.tools.packager.PackagerLib.packageAsJar(PackagerLib.java:246)
 at com.sun.javafx.tools.ant.FXJar.execute(FXJar.java:150)
 ... 21 more

0
Comment actions Permalink

I just installed Inno Setup 5, and again I can create an exe installer from NetBeans, but I get the same errors when I try using IntelliJ; it builds a working jar file but fails to create a package. I can also successfully create an image from the commnand line, using the jar that IntelliJ built.

0

Please sign in to leave a comment.