Discussion:
JRE, Java and JavaFX
(too old to reply)
Lampshade
2017-12-30 11:57:02 UTC
Permalink
Raw Message
Hello,
I would like to know whether is possible to execute GUI app
based on JavaFX using OpenBSD's package for JRE.
I had tried to compile and run but Maven says it can't find JavaFX
classes.
I also tried to compile on Windows and then copy target directory to
OpenBSD, but again I see something similar:

/usr/local/jre-1.8.0/bin/java -cp target/app-0.1-SNAPSHOT.jar
com.company.app.Main
Exception in thread "main" java.lang.NoClassDefFoundError:
javafx/application/Application
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.company1.app.Main.main(Main.java:7)
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:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 13 more

Have a nice day.
Loading...