I am willing to try javafx for the first time, I went to Oracle javafx site to find that javafx now comes with the JDK 7u25. I updated my java version but I am not sure what I am looking for. I get "cannot find symbol" errors whenever I try to import and use a javafx class. I found "javafx-mx.jar" "javafx-doclet.jar" "ant-javafx.jar" files in %JAVA_HOME%/lib but as far as I understand, those are meant to be used by the JRE not the JDK. I would really like not to be dependant on any eclipse plugins. I use maven for the build process. I have seen a couple of javafx maven plugins, but they seem to target the javafx tools. Am I getting the wrong picture? How would I get those classes to be imported correctly?
EDIT
Now I am able to compile the project using what I found here. It suggest to add:
<dependency>
<groupId>com.oracle</groupId>
<artifactId>javafx</artifactId>
<version>2.2</version>
<scope>system</scope>
<systemPath>${java.home}/lib/jfxrt.jar</systemPath>
</dependency>
This solved my build issues, but I can't run the program, I am trying to run this simple example, but I get this error:
java.lang.NoClassDefFoundError: javafx/application/Application
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:792)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:285)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.ClassNotFoundException: javafx.application.Application
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
Any ideas on how to add the same library to runtime? I am using maven-exec-plugin.