Include Android platform jars when using javah tool

586 views Asked by At

How to include jar files of the Android platform when using the javah tool to create a C/C++ .h header file ???

1

There are 1 answers

1
Mārtiņš Možeiko On BEST ANSWER

Assuming:

  1. your android SDK is installed in C:\android\sdk (and you have downloaded Android 1.5 platform)
  2. 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.