Thanks to Randy Rizun for pointing this out:
Hi!
just wanted to point out an issue in cjni_config_load_plugin
the call to FindClass passes the "Name" verbatim from the LoadPlugin directive
one might intuitively say LoadPlugin "com.foobar.Plugin"
whereas FindClass wants to see it as "com/foobar/Plugin"
so I guess either (a) document LoadPlugin to say to use slashes or (b)
subst / for . in cjni_config_load_plugin or (c) something else?!?
of course, everything works fine if my plugin is in the 'default' java
package (i.e., no package name) =)
either way, thanks a lot for the great work!!
-Randy
class->class = NULL;
class->object = NULL;
+ { /* Replace all dots ('.') with slashes ('/'). Dots are usually used
+ thorough the Java community, but (Sun's) `FindClass' and friends need
+ slashes. */
+ size_t i;
+ for (i = 0; class->name[i] != 0; i++)
+ if (class->name[i] == '.')
+ class->name[i] = '/';
+ }
+
DEBUG ("java plugin: Loading class %s", class->name);
class->class = (*jvm_env)->FindClass (jvm_env, class->name);