[collectd] cjni_config_load_plugin

Florian Forster octo at verplant.org
Thu May 28 12:19:23 CEST 2009

Hi Randy,

On Wed, May 27, 2009 at 03:28:50PM -0700, Randy Rizun wrote:
> 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?!?

good point, thanks for pointing this out :) I've added a simple patch to
the Java plugin which unconditionally replaces all dots with slashes. I
hope this doesn't introduce any problems with nestes classes or the

On Wed, May 27, 2009 at 04:04:03PM -0700, Randy Rizun wrote:
> also, in java.c
> there are three (3) invocations of FindClass that use "." periods
> instead of "/" slashes
> java.lang.Long
> java.lang.Double
> org.collectd.api.DataSet

I found and fixed the first two, but I did not find
`org.collectd.api.DataSet'.. But I found (and fixed) this one:

  m_constructor = (*jvm_env)->GetMethodID (jvm_env,
 -    c_dataset, "<init>", "(Ljava.lang.String;)V");
 +    c_dataset, "<init>", "(Ljava/lang/String;)V");

Thanks for your pointers :)

Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20090528/0bf38450/attachment.pgp 

More information about the collectd mailing list