Hi NetBeans modules system experts,

I'm trying to fix OpenJFX in NetBeans without changing the native code
of OpenJFX. I observed, that OpenJFX on NetBeans fails with a segfault
when a "normal" Webpage (https://netbeans.apache.org) is loaded. I
could it track down to this code:

https://github.com/openjdk/jfx/blob/jfx16/modules/javafx.web/src/main/native/Source/WTF/wtf/java/FileSystemJava.cpp#L37-L42

At that point the native code tries to load the class
com.sun.webkit.FileSystem via JNI Env FindClass.

In this case it fails because this code path is invoked from a new
native thread and thus java falls back to this loading procedure:

   Since Java 2 SDK release 1.2, when FindClass is called through the
   Invocation Interface, there is no current native method or its
   associated class loader. In that case, the result of
   ClassLoader.getSystemClassLoader is used. This is the class loader
   the virtual machine creates for applications, and is able to locate
   classes listed in the java.class.path property.

As the OpenJFX classes are loaded through the NetBeans module system,
they are obviously not on the SystemClassLoader.

So is there a way to put classes onto the SystemClassLoader with
NetBeans? Or plain Java? Ideas are welcome, the less hacky the better.

Greetings

Matthias


PS: This is a bug in OpenJFX which makes assumptions, that are only
valid if loaded as the equivalent of a core JDK module, but it crashes
NetBeans ...


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Reply via email to