JNI: Passing multiple parameters in the function signature for GetMethodID
http://stackoverflow.com/questions/7940484/jni-passing-multiple-parameters-in-the-function-signature-for-getmethodid
ASK :
I am trying to execute a function in Java (from C) that has the following signature:
public void execute(int x, int y, int action);
My problem is to define the function signature in GetMethodID:
env->GetMethodID(hostClass, "execute", "(I;I;I;)V");
The problem I ma getting is:
W/dalvikvm( 1849): Bogus method descriptor: (I;I;I;)V
W/dalvikvm( 1849): Bogus method descriptor: (I;I;I;)V
D/dalvikvm( 1849): GetMethodID: method not found: Lcom/device/client/HostConnection;.execute:(I;I;I;)V
I am not sure how to specify the method signature in GetMethodID (for 3 integers as parameters). I saw people use the ";" to separate parameters in other posts for the String and File class, but nothing with primitives like integer.
What would be the correct way to do this please? Thank you.
ANSWER:
According to this file you should use (III)V signature. Only when you need to specify fully qualified class you should use ';', like Ljava/lang/String;.
http://docs.oracle.com/javase/1.5.0/docs/guide/jni/spec/types.html#wp276
JNI: Passing multiple parameters in the function signature for GetMethodID的更多相关文章
- MyBatis(3.2.3) - Passing multiple input parameters
MyBatis's mapped statements have the parameterType attribute to specify the type of input parameter. ...
- Parameter Passing / Request Parameters in JSF 2.0 (转)
This Blog is a compilation of various methods of passing Request Parameters in JSF (2.0 +) (1) f:vi ...
- [MetaHook] Find a function signature
Find a non-public function signature, we need a tool "IDA Pro" ( You can open picture in a ...
- [Go] Returning Multiple Values from a Function in Go
Returning multiple values from a function is a common idiom in Go, most often used for returning val ...
- [Functional Programming] Function signature
It is really important to understand function signature in functional programming. The the code exam ...
- Can't bind multiple parameters ('header' and 'parameters') to the request's content.
2019-01-23 15:46:29.012+08:00 ERROR [6]: System.InvalidOperationException: Can't bind multiple param ...
- Unity: Passing Constructor Parameters to Resolve
In this tutorial we will go through of couple different ways of using custom constructor parameters ...
- [Angular 2] Pipes with Multiple Parameters
Showing how to set up a Pipe that takes multiple updating inputs for multiple Component sources. imp ...
- [转]JSTL 自定义方法报错Invalid syntax for function signature in TLD.
Apache Tomcat/6.0.18 ${my:splitApply(apply)} <function> <name>splitApply</name> &l ...
随机推荐
- django 的mysql数据配置
原地址:http://blog.csdn.net/gamesofsailing/article/details/21465327 在成功安装python-mysql后,开始配置django的mysql ...
- Eclipse执行Hadoop WordCount
前期工作 我的Eclipse是安装在Windows下的,通过Eclipse执行程序连接Hadoop, 需要让虚拟机的访问地址和本机的访问地址保持在同一域内,虚拟机的地址更改前面的文章介绍过了,如果想改 ...
- linux的定时任务crontab
每隔一分钟执行以下语句: #打印当前时间: date "+%Y-%m-%d %T" 保存为/usr/test/test.sh 查看系统中当前用户有多少个定时任务: crontab ...
- FastScroll(2)不分组的listview 打开fastscroll的分组提示功能
本文只让fastscroll具有提示分组功能,但listview并不显示分组,如果想让分组的listview显示fastscroll,看下篇. 1,在listview中打开fastscroll 2,自 ...
- String.IndexOf String.IndexOf String.Substring
String.IndexOf String.IndexOf 方法 (Char, Int32, Int32)报告指定字符在此实例中的第一个匹配项的索引.搜索从指定字符位置开始,并检查指定数量的字符位置. ...
- 在C++中调用DLL中的函数
如何在C++中调用DLL中的函数 应用程序使用DLL可以采用两种方式:一种是隐式链接,另一种是显式链接.在使用DLL之前首先要知道DLL中函数的结构信息.Visual C++6.0在VC\bin目录下 ...
- regsvr32提示模块加载失败 请确保二进制
微软官方的一部分解释 https://support.microsoft.com/en-us/kb/249873 关于32位和64位的说明 http://csi-windows.com/blog/al ...
- ibeacons社区
http://www.idropbeacon.com http://www.chinaibeacons.com http://iwebad.com/tag/ibeacon http://www.cng ...
- 8款必备的免费移动Web开发框架(HTML5/JS)
标签:JavaScript HTML5 移动开发 Web开发 jQuery 应用程序框架 插件 概述:随着智能手机和平板电脑的普及,移动开发逐渐成为众多开发者追逐的潮流.拥有一款优秀的移动Web开发框 ...
- Json.net 同过 JsonConverter 调整导出值(未完成)
public class TimeSpanConverter : JsonConverter { public override bool CanConvert(Type objectType) { ...