I am trying to run a jar file on linux of swing project using JavaFX . I have installed JRE7 on linux .
My project jar is using two jars: jfxrt.jar and lucene.jar . I have copied the jars to /home/projectdir/lib/ and also set the classpath by following command
export CLASS PATH=/home/projectdir/lib/jarfilename.jar
but I am still getting an error while running my project jar with the help of following command:
java -jar projectjar.jar
you have a typo in enviroment variable: it should be CLASSPATH (without space in the middle).
Also you will need to put both jars:
or better use relative paths:
But you must use main class name, not -jar, as pointed out in another answer.