I try to compress my javafx app into jar, and when i run:
java -jar /home/roroco/Dropbox/rbs/ro_cmds_global/j/fileToClip/build/libs/server-1.0.jar -cp /home/roroco/Downloads/jdk1.8.0_74/jre/lib/ext/jfxrt.jar
it raise this error:
Caused by: java.lang.ClassNotFoundException: javafx.application.Application
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
I'm sure jfxrt.jar include javafx.application.Application
roroco@roroco /tmp/fileToClip $ jar tf
/home/roroco/Downloads/jdk1.8.0_74/jre/lib/ext/jfxrt.jar|gr Application\.class
com/sun/glass/ui/Application.class
com/sun/glass/ui/gtk/GtkApplication.class
javafx/application/Application.class
why it will raise "ClassNotFoundException"?
update
my java version is:
roroco@roroco ~/Dropbox/try/j/try $ java -version
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-0ubuntu4~14.04-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
lib/extfolder are on the class path by default. Are you certain thatjavais pointing to that jdk version (what doesjava -versiongive?).