Search This Blog

Monday, July 30, 2012

JNI - get method signature

sometimes when you mixed java and C++ code you must used JNI.
So the best way to find the method signature is via javap application that exist in JAVA jdk.

in case you want to see the method  signature to initialize your jmethodID  follow the next steps:

  1. open command windows
  2. navigate to your class directory (where the class file exist, e.g. c:\xxx\bin\com\)
  3. run the javap.exe -c -s [class name]    ( without the .class e.g. javap -c -s myclass)
make sure your javap is in the PATH , or write the full path to it.

enjoy
Yaniv Tzanany

No comments: