JavaFX, Maven, and Executables

I am glad to see Maven getting more attention from JavaFX folks.


These are a couple of good recent posts: JavaFX and Maven and more recently Create JavaFX executables with maven


I created a project using the pom from the second post on OS X running Java 1.7.0_06-ea-b19 and had some, but what now is very little, trouble.


In addition to having to precede the {java.home} and {javafx.version} variables with a dollar sign, I ran into and Ant issue which was solved for me with this: Ant tasks that use the JDK


After getting the project to build and package (that packaging part is cool especially the first time you see it) I had one more problem.  The IDE, in my case NetBeans, despite successful builds, would not run or debug the program.


Now it's obvious that NetBeans could not find the JavaFX runtime which I solved by adding a symbolic link in the extensions directory.  Here is the command I used from the /Library/Java/Extensions directory


ln -s /Library/Java/JavaVirtualMachines/jdk1.7/Contents/Home/jre/lib/jfxrt.jar .

The project is here.

HTH,
Carl



Comments

Popular posts from this blog

ClassCastException: JAXB

Minishift on HyperV

Parallel to Lincoln's angry letters never sent concept...