From 9ae4ff9053e3ae8923db028b75669fcda19eb4ae Mon Sep 17 00:00:00 2001 From: Randy Rizun Date: Thu, 28 May 2009 12:06:37 +0200 Subject: [PATCH] java plugin: Use slashes rather than dots to lookup classes. there are three (3) invocations of FindClass that use "." periods instead of "/" slashes java.lang.Long java.lang.Double org.collectd.api.DataSet those need to be fixed up to use "/" slashes Thanks! --- src/java.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/java.c b/src/java.c index 20523f90..c12cdfce 100644 --- a/src/java.c +++ b/src/java.c @@ -227,7 +227,7 @@ static jobject ctoj_jlong_to_number (JNIEnv *jvm_env, jlong value) /* {{{ */ jmethodID m_long_constructor; /* Look up the java.lang.Long class */ - c_long = (*jvm_env)->FindClass (jvm_env, "java.lang.Long"); + c_long = (*jvm_env)->FindClass (jvm_env, "java/lang/Long"); if (c_long == NULL) { ERROR ("java plugin: ctoj_jlong_to_number: Looking up the " @@ -255,7 +255,7 @@ static jobject ctoj_jdouble_to_number (JNIEnv *jvm_env, jdouble value) /* {{{ */ jmethodID m_double_constructor; /* Look up the java.lang.Long class */ - c_double = (*jvm_env)->FindClass (jvm_env, "java.lang.Double"); + c_double = (*jvm_env)->FindClass (jvm_env, "java/lang/Double"); if (c_double == NULL) { ERROR ("java plugin: ctoj_jdouble_to_number: Looking up the " @@ -608,7 +608,7 @@ static jobject ctoj_data_set (JNIEnv *jvm_env, const data_set_t *ds) /* {{{ */ /* Search for the `DataSet (String type)' constructor. */ m_constructor = (*jvm_env)->GetMethodID (jvm_env, - c_dataset, "", "(Ljava.lang.String;)V"); + c_dataset, "", "(Ljava/lang/String;)V"); if (m_constructor == NULL) { ERROR ("java plugin: ctoj_data_set: Looking up the " -- 2.30.2