Ah, I see.
The JNIEnv returned by jvm->GetEnv(...) is not necessarily NULL.
It's probably a non-NULL value, but before using it from a native thread
one has to attach it to the JVM by law :-).
Hope this clarifies.
Kind regards,
Antonio
P.S.:
Matthias' patch caches the "com.sun.webkit.FileSystem" jclass in JNIOnload.
Then on a native thread:
- it attaches the thread to the JVM (mandatory, was missing)
- reuses the cached "com.sun.webkit.FileSystem" class
So Matthias's patch fixes two issues at once (the mandatory attachment
and not requiring finding a class that could not be found on a native
thread)! :-O
El 9/4/21 a las 15:29, Neil C Smith escribió:
Yes, I'm aware of the attachment requirement. I'm curious how the
code can get past the calls to GetStaticMethodID and FindClass if
JNIEnv is NULL?
---------------------------------------------------------------------
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