I have a simple javafx application, i've tried maven javafx plugin.
It seems to work, but when i try to launch the application from the command line, i get:
Exception in thread "main" java.lang.NoClassDefFoundError: javafx/application/Application
So it doesn't find javafx library. So i make sure that the jvm launched by Netbeans is the same of the jvm that i use from commandline.
This is the first line of Netbeans (7.3) debug:
cd C:\Users\agostino\Documents\NetBeansProjects\myapp; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.7.0_21" "\"C:\\Program Files\\NetBeans 7.3\\java\\maven\\bin\\mvn.bat\"" "-Dexec.args=-classpath %classpath com.test.myapp.AppView -Dlog4j.debug=true" "-Dexec.executable=C:\\Program Files\\Java\\jdk1.7.0_21\\bin\\java.exe" process-classes org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
and this is the test i did from commandline:
C:\Users\agostino\Documents\NetBeansProjects\myapp>java -version
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
Since I have just one installation of this jvm version, it must be the same.
Then what is going on here?
Is there some other test that would help me in debugging application startup?
In addition, I am very worried that when distributing javafx applications on clients, there will be a lot of such problems and that will require a lot of tuning, so I'm wondering what the best practises are.