[ImageJ-devel] imagej-loader / dlopen args
Lee Kamentsky
leek at broadinstitute.org
Wed Mar 18 08:47:45 CDT 2015
Hi dscho,
I'm programming "monkey see, monkey do" style. I have very little idea what
I'm doing, trying to replicate the logic for mac loading dylibs in
imagej-loader.
I've gotten pretty far, but at the end, I'm seeing the error,
"JavaNativeFoundation: GetGlobalVM: JNI_GetCreatedJavaVMs() failed to get
any VM" when I start an AWT app.
I am guessing that this is why you dlopened libjli here
<https://github.com/imagej/imagej-launcher/blob/master/src/main/c/ImageJ.c#L264>.
I do the same, but (so far) with Python's ctypes.CDLL. That doesn't let you
specify RTLD_LAZY as a dlopen mode. So, I think that's the big difference
between how you do things and how I do them. My first question is whether
RTLD_LAZY is needed as the mode. My second question is why you needed to
load libjli.dylib in the first place and, if you might grant me a third
wish, my third question is whether you've seen this error before.
Thanks in advance, Mr. Wizard.
--Lee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20150318/8a97ef2d/attachment.html>
More information about the ImageJ-devel
mailing list