i have a native method with user defined datatypes(structure) as the parameters.How do i call this method from java using JNI?
i have a native method with user defined datatypes(structure) as the parameters.How do i
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you have a method like this:
You cannot call it directly. You will need a layer of JNI to glue it together.
So a JNI function is someting generated from your code:
Running
javahon that class you would get a header file like this:Implementing that method to call
cFunction(mydatatype):