I have created an app using JavaFX 2.1 and wish to export it to be tested. This is the first "real" application I've made, so I have never done this before. In Windows 7 with eclipse I export a runnable jar, click on it, and nothing happens. Can someone tell me why this might be?
Information on Packaging
The app below was packaged using the command line javafxpackager tool. JavaFX also provides ant tasks for packaging. I believe you could create an ant script for packaging and run it's tasks from inside Eclipse.
The e(fx)clipse plugin provides integrated JavaFX packaging functionality by wrapping the JavaFX ant tasks. When developing JavaFX applications with Eclipse, use of e(fx)clipse is highly recommended.
Verifying your JavaFX Packaging
jar xf <jarfile>).
C:\dev\javafx\willow\dist>jar xf willow.jar C:\dev\javafx\willow\dist>type MANIFEST.MF Manifest-Version: 1.0 JavaFX-Version: 2.1 JavaFX-Application-Class: org.jewelsea.willow.Willow JavaFX-Class-Path: lib\image4j.jar lib\PDFRenderer-0.9.1.jar Created-By: JavaFX Packager Main-Class: com/javafx/main/Main C:\dev\javafx\willow\dist>java -jar willow.jar
For your manifest the
JavaFX-Application-Class entry will vary and the
JavaFX-Class-Path attribute is probably not needed.
The example jar I used can then be run from the command line using
java -jar <jarfile>.
Like mentioned by the jewelsea e(fx)clipse provides you an export wizard which uses the ant tasks provided by JavaFX. You can find a step by step tutorial at https://wiki.eclipse.org/Efxclipse/Tutorials/Tutorial1