I created a jar file at the end of my project. I build it with IntelliJ and inside it, the file runs smoothly. But the moment I try and execute it from the Desktop, I get nothing. Zero response. If I try to open it from the command line I get this message:
Error: JavaFX runtime components are missing, and are required to run this application
So I figured - I need to install separate JRE. Originally I thought it came along with my JDK but apparently it did not. So I installed JRE in the same Java folder I have my JDK. I run the program again, and now I get this error...
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/javafx/main/Main has been compiled by a more recent version of the Java Runtime (class file version 57.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
I do not understand why it has a problem with my installation. The file was downloaded from Oracle, I didn't even change default destination folder.
I am currently using JDK 13.0.1 and JRE 1.8.0_231