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 ...
随机推荐
- Unity3D开发之查找面板上某个脚本(包括Missing)
原地址:http://blog.csdn.net/lihandsome/article/details/24265411 有时候我们需要知道某个脚本在场景上面哪里用到,或者那个脚本被删除了但又没有把相 ...
- linux下c/c++ IDE开发工具介绍
为避免以下某个软件安装时不自动安装 build-essential 不妨先执行: sudo apt-get install build-essential [编辑 ]anjuta Anjuta Dev ...
- pdb文件 小结
.pdb文件,是VS生成的用于调试的符号文件(program database),保存着调试的信息.在VS的工程属性,C/C++,调试信息格式,设置/Zi,那么VS就会在构建项目时创建PDB文件. 在 ...
- snoopy(强大的PHP采集类) 详细介绍
Snoopy是一个php类,用来模拟浏览器的功能,可以获取网页内容,发送表单,可以用来开发一些采集程序和小偷程序,本文章详细介绍snoopy的使用教程. Snoopy的一些特点: 抓取网页的内容 fe ...
- HDU 2159 FATE (DP 二维费用背包)
题目链接 题意 : 中文题不详述. 思路 : 二维背包,dp[i][h]表示当前忍耐值为i的情况下,杀了h个怪得到的最大经验值,状态转移方程: dp[i][h] = max(dp[i][h],dp[i ...
- Google Play市场考察报告
考察了Google Play日本市场的10款应用,考察的重点在于每个App有什么亮点,盈利模式在哪里.本文并不是App的功能介绍. (1)恋爱文集[文库类应用] 该应用收录了一些恋爱文章,其主要受众是 ...
- android 多个listView的向下滚动设置 listView动态设置高度代码
墨迹天气图: 这里都是用的android里面的shape实现的,实现起来比较简单,只是在滚动的时候有点小麻烦... 当我们多个ListView超出了它的父控件LinearLayout的时候,它们每个L ...
- 【转】wireshark过滤规则
WireShark过滤语法 1.过滤IP,如来源IP或者目标IP等于某个IP 例子:ip.src eq 192.168.1.107 or ip.dst eq 192.168.1.107或者ip.add ...
- Android:控件Spinner实现下拉列表
在Web开发中,HTML提供了下拉列表的实现,就是使用<select>元素实现一个下拉列表,在其中每个下拉列表项使用<option>表示即可.这是在Web开发中一个必不可少的交 ...
- socket.io 使用
socket.io是一个以实现跨浏览器.跨平台的实时应用为目的的项目.针对不同的浏览器版本或者不同客户端会做自动降级处理,选择合适的实现方式(websocket, long pull..),隐藏实现只 ...