Hi All,
May i know how to create c header file using java jni for a class which is inside a jar file.
I have created a jar called HelloWorld.jar (using Netbeans) which has only class file as below
package example;
public class HelloWorld {
public native void print(); //native method
static //static initializer code
{
System.loadLibrary("CLibHelloWorld");
}
public static void main(String[] args)
{
HelloWorld hw = new HelloWorld();
hw.print();
}
}
i tried following command
javah -jni HelloWorld
i am getting below error
error: cannot access HelloWorld
class file for HelloWorld not found
javah -jni example.HelloWorld
i am getting below error
error: cannot access HelloWorld
class file for HelloWorld not found
Please let me know how to create the c header file.