cemfi / meico

A converter framework with support for MEI, MSM, MPM, MIDI, WAV, MP3, chroma, and XSLT
GNU General Public License v3.0
69 stars 14 forks source link

App cannot be launched #25

Closed hohwille closed 2 years ago

hohwille commented 2 years ago

Hi there, I just stumbled over your project and wanted to give it a try. However, launching your app with java -jar meicoApp.jar does not work. With Java 1.8:

Exception in thread "main" java.lang.UnsupportedClassVersionError: javafx/application/Application has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)

With Java 11:

Graphics Device initialization failed for :  d3d, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
        at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
        at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:222)
        at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260)
        at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
        at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
        at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
        at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
        at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
        at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
        at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
        ... 1 more
Exception in thread "main" java.lang.RuntimeException: No toolkit found
        at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:272)
        at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
        at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
        at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
        at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
        at java.base/java.lang.Thread.run(Thread.java:834)

IMHO you should consider switching to OpenJFX. Otherwise, you might want to improve your README with hints from here: https://github.com/javafxports/openjdk-jfx/issues/237

axelberndt commented 2 years ago

Hm, on my system runs an OrcaleJDK 1.8.0_127-b11 and meico starts as it should. I have also no problems running it on OpenJDK 11.0.1. The required OpenJFX 11 externals are already in the project (see here) and should be used on JREs that no longer contain it (v11+ I think). Having trouble to reproduce your case. I may miss something here, so if you have a hint, please let me know, or even solution, then please prepare a pull request. Any help is welcome.

axelberndt commented 2 years ago

Ah, I just reproduced your Java 11 case. Hmmm, still wondering why it went wrong. In Java 1.8, however, all works correctly.

axelberndt commented 2 years ago

OK, after researching a bit further, I think the JavaFX 11 jars already included in the project do not help much without the platform dependent(!) counterparts from JavaFx's bin subfolder. So for now, meicoApp is only runnable on Java versions 1.8-10. This does explicitly not apply to the meico framework itself which runs on all Java versions from 1.8 to now. Only the meicoApp, due to its reliance of JavaFX, is problematic. Seems like we need totally different versions for Java versions 11+ and operating systems. And these will not run on older Javas (1.8 is mandatory). I have no quick solution for this issue, yet - still searching. Any suggestions?

axelberndt commented 2 years ago

With the recent release v0.8.38 I removed the JavaFX externals from meicoApp. I assume that your problems with running meicoApp on Java 1.8 might have originated in these files. Could you give me some feedback if it works now on your Java 1.8 configuration?

axelberndt commented 2 years ago

In the absense of further feedback I assume that the problem is solved and close this issue. MeicoApp should run fine now on Java 1.8-10. More recent Java versions require a new compilation that includes appropriate JavaFX dependencies. The compatibility is also indicated now in the README.md of the meicoApp branch.