posted 11 years ago
I downloaded the javafx from the homepage and I wish I could put into my classpath. So in Ubuntu I did this :
vi ~/.bashrc
opened the file and added the following lines :
JAVAFX_HOME=${HOME}/javafx/rt/lib/jfxrt.jar
export PATH=$PATH:$JAVAFX_HOME
provided that I have downloaded my JavaFx into my ${HOME}/javafx/ directory!
And I did this as well :
echo $PATH
which ouptputs :
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/anto/javafx/rt/lib/jfxrt.jar
But when I run my JavaFx program using Groovy like this :
groovy HelloWorld.groovy
I get an error like this :
Caught: java.lang.NoClassDefFoundError: javafx/application/Application
java.lang.NoClassDefFoundError: javafx/application/Application
Caused by: java.lang.ClassNotFoundException: javafx.application.Application
Where I went wrong? Kindly help me out. I'm facing this problem for a day!