Closed didibus closed 5 years ago
It seems this is because the OpenJDK 8 build that comes with OpenSuse does not include JavaFX. Similarly, AdoptOpenJDK 8 does not include JavaFX yet either. I'm going to try either Zulu's or Amazon's and report back.
It did not work with Amazon Corretto 8, I got error:
$ clj -R:rebl -m cognitect.rebl [23/23]
Clojure 1.10.0
user=> #error {
:cause Can't load library: /usr/lib/jvm/java-1.8.0-amazon-corretto/jre/lib/amd64/libjfxwebkit.so
:via
[{:type javafx.fxml.LoadException
:message
file:/home/didier/bin/REBL-0.9.218.jar!/cognitect/rebl/rebl.fxml:42
:at [javafx.fxml.FXMLLoader constructLoadException FXMLLoader.java 2601]}
{:type java.lang.RuntimeException
:message java.lang.reflect.InvocationTargetException
:at [javafx.fxml.JavaFXBuilder$ObjectBuilder build JavaFXBuilderFactory.java 278]}
{:type java.lang.reflect.InvocationTargetException
:message nil
:at [sun.reflect.NativeMethodAccessorImpl invoke0 NativeMethodAccessorImpl.java -2]}
{:type java.lang.UnsatisfiedLinkError
:message Can't load library: /usr/lib/jvm/java-1.8.0-amazon-corretto/jre/lib/amd64/libjfxwebkit.so
:at [java.lang.ClassLoader loadLibrary ClassLoader.java 1827]}]
:trace
[[java.lang.ClassLoader loadLibrary ClassLoader.java 1827]
[java.lang.Runtime load0 Runtime.java 809]
[java.lang.System load System.java 1086]
[com.sun.glass.utils.NativeLibLoader loadLibraryFullPath NativeLibLoader.java 201]
[com.sun.glass.utils.NativeLibLoader loadLibraryInternal NativeLibLoader.java 94]
[com.sun.glass.utils.NativeLibLoader loadLibrary NativeLibLoader.java 39]
[com.sun.webkit.WebPage lambda$static$0 WebPage.java 133]
[java.security.AccessController doPrivileged AccessController.java -2]
[com.sun.webkit.WebPage <clinit> WebPage.java 132]
[javafx.scene.web.WebEngine <init> WebEngine.java 881]
[javafx.scene.web.WebEngine <init> WebEngine.java 868]
[javafx.scene.web.WebView <init> WebView.java 273]
[javafx.scene.web.WebViewBuilder build WebViewBuilder.java 60]
[sun.reflect.NativeMethodAccessorImpl invoke0 NativeMethodAccessorImpl.java -2]
[sun.reflect.NativeMethodAccessorImpl invoke NativeMethodAccessorImpl.java 62]
[sun.reflect.DelegatingMethodAccessorImpl invoke DelegatingMethodAccessorImpl.java 43]
[java.lang.reflect.Method invoke Method.java 498]
[sun.reflect.misc.Trampoline invoke MethodUtil.java 71]
[sun.reflect.GeneratedMethodAccessor2 invoke nil -1]
[sun.reflect.DelegatingMethodAccessorImpl invoke DelegatingMethodAccessorImpl.java 43]
[java.lang.reflect.Method invoke Method.java 498]
[sun.reflect.misc.MethodUtil invoke MethodUtil.java 275]
[javafx.fxml.JavaFXBuilder$ObjectBuilder build JavaFXBuilderFactory.java 270]
[javafx.fxml.FXMLLoader$ValueElement processEndElement FXMLLoader.java 763]
[javafx.fxml.FXMLLoader processEndElement FXMLLoader.java 2823]
[javafx.fxml.FXMLLoader loadImpl FXMLLoader.java 2532]
[javafx.fxml.FXMLLoader loadImpl FXMLLoader.java 2441]
[javafx.fxml.FXMLLoader load FXMLLoader.java 2409]
[cognitect.rebl.ui$init$fn__15791 invoke ui.clj 407]
[clojure.lang.AFn run AFn.java 22]
[com.sun.javafx.application.PlatformImpl lambda$null$5 PlatformImpl.java 295]
[java.security.AccessController doPrivileged AccessController.java -2]
[com.sun.javafx.application.PlatformImpl lambda$runLater$6 PlatformImpl.java 294]
[com.sun.glass.ui.InvokeLaterDispatcher$Future run InvokeLaterDispatcher.java 95]
[com.sun.glass.ui.gtk.GtkApplication _runLoop GtkApplication.java -2]
[com.sun.glass.ui.gtk.GtkApplication lambda$null$10 GtkApplication.java 245]
[java.lang.Thread run Thread.java 748]]}
It worked with the Zulu OpenJDK, here is how to do it:
NOTE THIS IS FOR A JDK 8 INSTALL, I did not try any other version
.tar.gz
archive here (adapt to your architecture as needed): https://www.azul.com/downloads/zulu-community/?&version=java-8-lts&os=linux&architecture=x86-64-bit&package=jdk-fx~/bin
or wherever you prefer. The archive has a top level folder already, so don't double folder it..bashrc
or .zshrc
or wtv shell rc file you use, so that you add in it:
export PATH=~/bin/zulu8.40.0.25-ca-fx-jdk8.0.222-linux_x64/bin:$PATH
export JAVA_HOME=~/bin/zulu8.40.0.25-ca-fx-jdk8.0.222-linux_x64/
That's it, now launching with clj will pick up the Zulu JVM, and OpenJFX should be availaible again.
Running on OpenSuse with:
It seems that JavaFx can't be found:
Any ideas?
Thank You