Search code examples
javafx-8

webView is not working in openjfx 12 from eclipse maven project


I've used Java 8 to create JavaFX venture in which I utilized webview for HTML substance and it is JavaFX expert task. When I try to move to OpenJDK 12 from Java 8 it stops working. What's more, it returns the underneath blunder:

Exception in thread "JavaFX Application Thread"
java.lang.IllegalAccessError: superclass access check failed: class
com.sun.javafx.sg.prism.web.NGWebView (in unnamed module @0x2145b572)
cannot access class com.sun.javafx.sg.prism.NGGroup (in module
javafx.graphics) because module javafx.graphics does not export
com.sun.javafx.sg.prism to unnamed module @0x2145b572


Solution

  • Use this to VM arguments to load all libraries and it will work.

    -Djava.library.path=ext\windows64 --module-path "C:\Program Files\Java\javafx-sdk-12.0.1\lib" --add-modules javafx.controls,javafx.fxml,javafx.web,javafx.graphics,javafx.media