How to create a C header file using Javah?

I am using android ndk, and for that I am trying to create a c header file using the javah tool. How to use and where to use this tool? I am unable to understand.

Upvotes: 5

Views: 9554

Answers (1)

Donal Rafferty
Donal Rafferty

Reputation: 19826

Javah should be in the bin folder of your JDK

Something like this:

C:\Program Files\Java\jdk1.6.0_19\bin

For simplicities sake take the path name folder from the bin directory in your Android project and place it in the above directory.

Then use the command prompt

javah -jni com.pathname.ClassName

And the header file will be created in the JDK bin folder

Upvotes: 4

Related Questions