javadoc: error Illegal package name: JNI
Hi,
After writting the Java code using native method, Like
package jni;
public class jniFile {
static{
System.loadLibrary("jniFile");
}
public jniFile() {
System.out.println("Inside constructor ");
}
private native void printMessage(String msg);
public static void main(String[] args) {
jniFile m= new jniFile();
m.printMessage("String from java");
}
}
I tried to create the header file using javah -jni jniFile.
i got "javadoc: error - Illegal package name: "D:\JNI\build\classes\jni" error.
Can any one help me.
Thanks in advance.
# 2
The jni package which i used is a user defined one.
Now i changed it to jniPack.
Still i cant able to create a header file.
I am using netbean IDE 5.0.
I got the following error
C:\Documents and Settings\GUNR2818>javah -jni D:\JNI\build\classes\jniPack\jniPack
javadoc: error - Illegal package name: "D:\JNI\build\classes\jniPack\jniPack"
1 error
# 3
The jni package which i used is a user defined one.
Now i changed it to jniPack.
Still i cant able to create a header file.
I am using netbean IDE 5.0.
I got the following error
C:\Documents and Settings\GUNR2818>javah -jni D:\JNI\build\classes\jniPack\jniPack
javadoc: error - Illegal package name: "D:\JNI\build\classes\jniPack\jniPack"
1 error
# 4
javah operates on class names, not filenames.
Try this, given that you have a class named MyClass.class in jniPack:
C:> cd D:\JNI\build\classes\jniPack\jniPack
C:> javah MyClass
If your CLASSPATH environment variable does not include the current directory, you might need to use a command line like
C:> javah -classpath .;C:\Java\lib\classes.zip MyClass