Java class not found after building for Fedora

Hey,

I’m using Fedora 24 and worked hard through the build.md file to try and make it work. After long and exhilirating messing around, fixing various weird problems, finally, I managed to get to the last step, and wrote
mvn clean package -DskipTests -Dmaven.javadoc.skip=true
Much to my surprise, this ran perfectly; No errors, warnings, nothing of the sort, and in the end it clearly stated “BUILD SUCCESS”.

Now I went on to type java -jar gui/target/shaded.jar in the hopes it would run. Much to my dismay, this is the error message I received:

[qq@qq bitsquare]$ java -jar gui/target/shaded.jar
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:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at io.bitsquare.app.BitsquareAppMain.doExecute(BitsquareAppMain.java:66)
	at io.bitsquare.app.BitsquareExecutable.execute(BitsquareExecutable.java:69)
	at io.bitsquare.app.BitsquareAppMain.main(BitsquareAppMain.java:61)
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)
	... 15 more

Now I’m not exactly the most tech-savy guy out there. I tried working with google for a while, but I didn’t manage to produce a viable solution.
Could anyone provide any tips as to how I can finish this last step?

Thanks in advance.

Seems openJFX is not installed. JavaFX is not part of openJDK and needs to be installed extra if u dont use the Oracle jdk.

Hey again,

I thought i was using Oracle JDK (I have it installed), but turns out the ‘java’ command was linked to OpenJDK. Using Oracle JDK solved the problem, and I magically managed to run the program on Fedora.

Thanks a lot for the support! Althought I have to ask, why is it written in Java? Not exactly the best platform for such a project, don’t you think? Is there any rationale behind it?

Easier development and cross platform support. https://forum.bitsquare.io/t/why-use-java/1927