首页 \ 问答 \ JNI调用api:获取具有多个参数的方法的方法id(JNI invocation api: get method id for method with multiple parameters)

JNI调用api:获取具有多个参数的方法的方法id(JNI invocation api: get method id for method with multiple parameters)

我想从c ++调用java函数,它接受多个参数,我试过以下语句

mid=env->GetMethodID(JDeployerClass,"deploy","(Ljava/io/File;,Lorg/glassfish/api/deployment/DeployCommandParameters;)Ljava/lang/String;");

但是它没有用,上面的语句有什么问题吗?获取接受多个参数的方法id的正确方法是什么?


I want to call java function from c++ which takes multiple parameters , I have tried following statement

mid=env->GetMethodID(JDeployerClass,"deploy","(Ljava/io/File;,Lorg/glassfish/api/deployment/DeployCommandParameters;)Ljava/lang/String;");

But its not working out, is there anything wrong with above statement?, What is the correct way to get method id which accepts multiple parameters ?


原文:https://stackoverflow.com/questions/2844391
更新时间:2022-07-05 12:07

最满意答案

在基地,您将以树为单位查看您的城市网络,以离开的城市为根,每个离开的航班都是指向孩子的指针。 您将在树中执行递归深度优先搜索以查找到目标的所有路径,但是在您前进时检查一个循环并中止导致循环的任何路径。

当你找到可行的路径时,你可以保持最短但是找到一个单一的解决方案; 或保留更大的路径子集,如果您想在此基础上选择,则按出发时间的某些标准进行分层。

根据数据库和节点的具体情况,您还可以引入其他规则来缩短路径搜索时间,例如,如果您碰巧知道出发地和目的地相距1000英里,并且您到目前为止的路径已经飞行了3000次英里,你仍然不在那里,拧紧它,继续前进到下一个路径搜索。


At the base, you're going to view your city network as a tree, with departing city as root, and each departing flight being a pointer to a child. You'll do a recursive depth-first search through the tree to find all paths to the destination, but checking for a cycle as you go and aborting any path that results in a cycle.

As you find feasible paths, you can either just keep the shortest yet found as a singular solution; or keep a larger subset of paths found, stratified by some criteria around departure time if you want to select on that basis.

Depending on the specifics of the database and nodes, you can also throw in other rules for cutting short your path searches, e.g., if you happen to know that departure and destination are 1000 miles apart, and your path traced so far has you flying 3000 miles and you're still not there, screw it, move on to the next path search.

相关问答

更多
  • 是的,总的来说这是可能的,但正如@flup指出的那样,没有人会在客户端实现纯Javascript的全局路由(数据量,复杂性,性能......)。 相反,您使用或设置现有的路由解决方案 ,该解决方案可以发布RPC / ... Web界面,并且可以使用JS进行嵌入。 由于所有现有的解决方案都是开源的,因此您可以进行调整,而不是让交通信号灯的边缘比不使用交通信号灯更重。 目前没有解决方案似乎将它们考虑在内,我想有几个原因: 没有很好的映射到处 不同级别的细节来映射与交通灯的交叉(每个方向只有一个与一个) 所以我想 ...
  • ^@是从hostname -s打印的换行符,您可以使用tr -d '\n'删除它: let hostname=system('hostname -s | tr -d "\n"') let g:airline_section_a = '%{hostname}' 您还可以使用build in hostname函数: let g:airline_section_a = '%{hostname()}' 但必须有一个更优雅的解决方案 ^@ is the newline printed from hostname ...
  • 你的.vimrc文件看起来很好。 问题可能出在插件实现上,因为最近航空公司初始化有一些变化。 你的问题的直接解决方案是在航空公司插件的git历史中稍微退一步,据我所知,最后一次提交会导致问题,所以你只需输入: $ cd ~/.vim/bundle/vim-airline $ git checkout HEAD~1 如果您想了解最新的更改,请在github上监视它们,然后运行:PluginUpdate(用于Vundle安装)或者只需git pull origin master即可获得最新功能。 如果问题仍然 ...
  • if您需要将seat[0][j].length更改为k 。 数组的长度永远不会改变,您需要检查索引(循环在数组中的位置)是否为%3 System.out.println("**** Flight "+flightCode[0]+" ****"); for(int j=0 ; j
  • 简单地复制vim-airline / vim-airline-themes存储库。 航空公司的警告将消失。 Simply clone the vim-airline/vim-airline-themes repository as well. The warning from airline will then disappear.
  • 来自:help airline : ------------------------------------- *airline-hunks* vim-gitgutter vim-signify changes ...
  • 我认为你误解了vim-capslock是如何工作的。 它在Vim中实现了一个软件大写锁定,它会影响您键入的文本,但不会影响命令键。 它导出该状态,因此航空公司可以显示它。 但它与键盘上的硬件大写锁定键无关。 我不知道如何可靠地检测键盘上的大写锁定。 I think you're misunderstanding how vim-capslock works. It implements a software caps-lock in Vim, which affects text you type, but ...
  • 在基地,您将以树为单位查看您的城市网络,以离开的城市为根,每个离开的航班都是指向孩子的指针。 您将在树中执行递归深度优先搜索以查找到目标的所有路径,但是在您前进时检查一个循环并中止导致循环的任何路径。 当你找到可行的路径时,你可以保持最短但是找到一个单一的解决方案; 或保留更大的路径子集,如果您想在此基础上选择,则按出发时间的某些标准进行分层。 根据数据库和节点的具体情况,您还可以引入其他规则来缩短路径搜索时间,例如,如果您碰巧知道出发地和目的地相距1000英里,并且您到目前为止的路径已经飞行了3000次英 ...
  • 它已在ConEmu 151025中修复 It's been fixed in ConEmu 151025
  • 你应该用“应该”是什么意思? 你是如何得出这个假设的? 你有没看过航空公司的DBpedia页面 ,它提供了所有现有的事实? 这只是一个特定的资源,而不是一个类。 你查询做了什么:*他第一个三重模式返回“资源航空公司的所有名称”*第二个三重模式返回“资源印度的所有名称”*因为两个三重模式都没有通过变量连接 ,它将返回十字架两个结果集的产物 如果你想拥有特定类型的所有资源r_i :C ,这意味着三元组看起来像:r rdf:type :C ,你必须使用相应的三元模式: ?s rdf:type :C 在你的情况下, ...

相关文章

更多

最新问答

更多
  • h2元素推动其他h2和div。(h2 element pushing other h2 and div down. two divs, two headers, and they're wrapped within a parent div)
  • 创建一个功能(Create a function)
  • 我投了份简历,是电脑编程方面的学徒,面试时说要培训三个月,前面
  • PDO语句不显示获取的结果(PDOstatement not displaying fetched results)
  • Qt冻结循环的原因?(Qt freezing cause of the loop?)
  • TableView重复youtube-api结果(TableView Repeating youtube-api result)
  • 如何使用自由职业者帐户登录我的php网站?(How can I login into my php website using freelancer account? [closed])
  • SQL Server 2014版本支持的最大数据库数(Maximum number of databases supported by SQL Server 2014 editions)
  • 我如何获得DynamicJasper 3.1.2(或更高版本)的Maven仓库?(How do I get the maven repository for DynamicJasper 3.1.2 (or higher)?)
  • 以编程方式创建UITableView(Creating a UITableView Programmatically)
  • 如何打破按钮上的生命周期循环(How to break do-while loop on button)
  • C#使用EF访问MVC上的部分类的自定义属性(C# access custom attributes of a partial class on MVC with EF)
  • 如何获得facebook app的publish_stream权限?(How to get publish_stream permissions for facebook app?)
  • 如何防止调用冗余函数的postgres视图(how to prevent postgres views calling redundant functions)
  • Sql Server在欧洲获取当前日期时间(Sql Server get current date time in Europe)
  • 设置kotlin扩展名(Setting a kotlin extension)
  • 如何并排放置两个元件?(How to position two elements side by side?)
  • 如何在vim中启用python3?(How to enable python3 in vim?)
  • 在MySQL和/或多列中使用多个表用于Rails应用程序(Using multiple tables in MySQL and/or multiple columns for a Rails application)
  • 如何隐藏谷歌地图上的登录按钮?(How to hide the Sign in button from Google maps?)
  • Mysql左连接旋转90°表(Mysql Left join rotate 90° table)
  • dedecms如何安装?
  • 在哪儿学计算机最好?
  • 学php哪个的书 最好,本人菜鸟
  • 触摸时不要突出显示表格视图行(Do not highlight table view row when touched)
  • 如何覆盖错误堆栈getter(How to override Error stack getter)
  • 带有ImageMagick和许多图像的GIF动画(GIF animation with ImageMagick and many images)
  • USSD INTERFACE - > java web应用程序通信(USSD INTERFACE -> java web app communication)
  • 电脑高中毕业学习去哪里培训
  • 正则表达式验证SMTP响应(Regex to validate SMTP Responses)