I’ve got a Java class which starts with
package examples.logging;
public class FastLogging {
// Logging class
public static native long logging_new(int level, String domain, boolean console, String file, String server,
String connect, int max_size, int backlog);
public static native void logging_set_level(long instance_ptr, int level);
...
When I run javac -h . examples/logging/FastLogging.java
I get the following output:
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class examples_logging_FastLogging */
#ifndef _Included_examples_logging_FastLogging
#define _Included_examples_logging_FastLogging
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: examples_logging_FastLogging
* Method: logging_new
* Signature: (ILjava/lang/String;ZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;II)J
*/
JNIEXPORT jlong JNICALL Java_examples_logging_FastLogging_logging_1new
(JNIEnv *, jclass, jint, jstring, jboolean, jstring, jstring, jstring, jint, jint);
/*
* Class: examples_logging_FastLogging
* Method: logging_set_level
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_examples_logging_FastLogging_logging_1set_1level
(JNIEnv *, jclass, jlong, jint);
...
How can I avoid that javac is inserting the “1” in the created function names, like Java_examples_logging_FastLogging_logging_1set_1level
?