Althoug an extremely efficient for implementation of UI in Java, GroovyFX (the Groovy wrapper for JavaFX 2.0) is hard to run on command line (e.g., via Ant).
The only straightforward way of running it I was able to find is just to compile all the Groovy sources using groovyc Ant task and then to run the Java class corresponding to the main Groovy script. In this case, all the Groovy jars, the JavaFX runtime jar, and the GroovyFX jar have to be on the classpath.
Moreover, it is extremely important that you run the final Java task using
fork=”true”, otherwise you will get strange exceptions from the JavaFX runtime.
For a practical example of the Ant script running such an application, see the
build.xml at https://github.com/keznikl/GDeeco/blob/master/build.xml.
I wasn’t able to make it work just by running it as a regular groovy script (without compilation etc.).
What is your experience?