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.

[655 byte] By [anuradha@SDNa] at [2007-11-27 5:20:00]
# 1
Sun does not have a "jni" package in the Java platform. What package are you trying to load? Try removing "package jni;".
dhkramera at 2007-7-12 11:43:41 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 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

anuradha@SDNa at 2007-7-12 11:43:41 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 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

anuradha@SDNa at 2007-7-12 11:43:41 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 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

dhkramera at 2007-7-12 11:43:41 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 5
Thanks For ur reply
anuradha@SDNa at 2007-7-12 11:43:41 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...