diff --git a/src/java.c b/src/java.c
index 3089a5337fdc4b21b5c592d06185789da8e72107..b69ca946b301c36a367c114e98666c7b33e69acd 100644 (file)
--- a/src/java.c
+++ b/src/java.c
api_class_ptr = (*jvm_env)->FindClass (jvm_env, "org/collectd/api/Collectd");
if (api_class_ptr == NULL)
{
- ERROR ("cjni_init_native: Cannot find API class `org/collectd/api/Collectd'.");
+ ERROR ("cjni_init_native: Cannot find the API class \"org.collectd.api"
+ ".Collectd\". Please set the correct class path "
+ "using 'JVMArg \"-Djava.class.path=...\"'.");
return (-1);
}
cjni_callback_info_t *cbi;
jobject o_ocitem;
const char *name;
- int status;
size_t i;
jclass class;
method = (*jvm_env)->GetMethodID (jvm_env, class,
"config", "(Lorg/collectd/api/OConfigItem;)I");
- status = (*jvm_env)->CallIntMethod (jvm_env,
+ (*jvm_env)->CallIntMethod (jvm_env,
cbi->object, method, o_ocitem);
(*jvm_env)->DeleteLocalRef (jvm_env, o_ocitem);
if (config_block != NULL)
{
- int status;
- status = cjni_config_perform (config_block);
+ cjni_config_perform (config_block);
oconfig_free (config_block);
config_block = NULL;
}