madflow / flow-netbeans-markdown

Markdown file support for the NetBeans IDE
MIT License
279 stars 40 forks source link

Preview isn't working with OpenJDK8 and OpenJFX8 #124

Open barulheira opened 7 years ago

barulheira commented 7 years ago

It seems JFX preview requires Oracle JDK. But is it really needed?

java.lang.NullPointerException
    at flow.netbeans.markdown.preview.ext.FXHtmlView$2.run(FXHtmlView.java:52)
    at com.sun.javafx.application.PlatformImpl.lambda$null$5(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$6(PlatformImpl.java:294)
[catch] at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    at com.sun.glass.ui.gtk.GtkApplication.lambda$null$5(GtkApplication.java:139)
    at java.lang.Thread.run(Thread.java:745)

Preview works if "Use JavaFX" option is not selected. But it doesn't respect the HTML export template.

madflow commented 7 years ago

Which Operating System (Version) ?

barulheira commented 7 years ago

FreeBSD 12.0-CURRENT here.

madflow commented 7 years ago

I use Arch Linux and installed Netbeans via "Pacman" (apt-get in Arch Linux).

This is what I have:

Netbeans 8.2 Java: 1.8.0_121; OpenJDK 64-Bit Server VM 25.121-b13 Runtime: OpenJDK Runtime Environment 1.8.0_121-b13

Arch Linux also uses Openjfx. This is my installed version: java-openjfx 8.u121-1

So I would argue, that the Oracle JDK is not needed. This is what I found so far - maybe it helps debugging it further.

barulheira commented 7 years ago

Pretty much the same here:

OpenJDK Runtime Environment (build 1.8.0_121-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)
openjfx8-devel-20160228_1

(Perhaps the OpenJFX version is outdated?) Anyway, the exception happens here:

final Number x = (Number) webView.getEngine().executeScript("document.body.scrollLeft");

It seems there is no web view or engine available. If there's no workaround, then we must assume that OpenJFX is broken in FreeBSD.