sfa-siard / SiardGui

SIARD Suite - SiardGui
Other
17 stars 3 forks source link

Exception with openjdk (on MacOS) #14

Closed andreasnef closed 4 years ago

andreasnef commented 4 years ago

Hi Hartwig

I'm hitting an exception if I try to start Siard with my default JDK (OpenJDK), see below. Haven't verified, but assuming there is a problem with com.sun.* classes in an OpenJDK context. If I set JAVA_HOME to an Oracle JDK, the exception doesn't occur anymore.

Kind regards,

Andreas

$ java -version
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)
$ sh /Applications/siard_suite-2.1/siardgui.sh
/usr/bin/java -Xmx1024m -Dsun.awt.disablegrab=true -Djava.util.logging.config.file=/Applications/siard_suite-2.1/etc/logging.properties -jar /Applications/siard_suite-2.1/lib/siardgui.jar 
Graphics Device initialization failed for :  es2, 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:221)
    at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:248)
    at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:209)
    at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:675)
    at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:337)
    at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
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)
    at java.lang.Thread.run(Thread.java:748)
Exception in thread "main" java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: No toolkit found
    at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260)
    at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:209)
    at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:675)
    at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:337)
    at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
    ... 5 more
andreasnef commented 4 years ago

I assume this is less an implementation issue, but could be covered by a note in the documentation that a JavaFX implementation is required (Oracle obviously includes on, but for (some) OpenJDK distributions it needs to be installed separately).

HartwigThomas commented 4 years ago

Hi Andreas, we have never claimed support for OpenJDK. In the manual the need for Oracle JDK (versions 8 to 10) is explicitly mentioned as a prerequisite in many places. The reason, as you point out correctly, is mainly that OpenJDK does/did not support JavaFX. There may also be some other incompatibilities, that we have not bothered to check.

The problem is likely to disappear, when future versions of Oracle JDK and OpenJDK have been unified. The fact, that such a unification has been announced for future versions has motivated us, not to invest much effort in making SIARD compatible with OpenJDK (which version?) today.

andreasnef commented 4 years ago

Hi @HartwigThomas

Ok, I agree. I was mislead by just looking at the README.md and interpreted "Java JDK" as not specifically Oracle. It's absolutely clear in the manual.