How to include jar files of the Android platform when using the javah tool to create a C/C++ .h header file ???
Asked
Active
Viewed 584 times
0
-
How about -classpath argument? – Mārtiņš Možeiko May 12 '12 at 21:13
-
Actually this is the question, How to include the android platform jars with the -classpath argument ?? – Ayesh Qumhieh May 18 '12 at 00:17
1 Answers
1
Assuming:
- your android SDK is installed in C:\android\sdk (and you have downloaded Android 1.5 platform)
- your android NDK is installed in C:\android\ndk
Open command line window. Go to C:\android\ndk\samples\hello-jni folder. And execute the following:
javah -classpath C:\android\sdk\platforms\android-3;src com.example.hellojni.HelloJni
It will generate com_example_hellojni_HelloJni.h
file with JNI functions for hello-jni example from Android NDK.

Mārtiņš Možeiko
- 12,733
- 2
- 45
- 45
-
Thanks Mārtiņš it worked finally, but after the semi-column I just appended the full directory to the bin folder in my project without any spaces, then the full class name as you said "com.example.hellojni.HelloJni" – Ayesh Qumhieh May 18 '12 at 14:19