2014年1月2日星期四

Jni

Senior senior sister apprentice you good brother in java calling c + + is there is a problem , a few days failed to solve , we help ah forget
I finished with eclipse cdt c + + to write the code and compile successfully generated a dll file , but when the call occurred the following error

Exception in thread "main" java.lang.UnsatisfiedLinkError: com.easytoo.union.jni.SUNSONPwd.SUNSON_OpenCom(II)I
at com.easytoo.union.jni.SUNSONPwd.SUNSON_OpenCom(Native Method)
at com.easytoo.union.jni.SUNSONPwd.getPinPwd(SUNSONPwd.java:73)
at com.easytoo.union.impl.UnionPayDeviceImpl.getPinPwd(UnionPayDeviceImpl.java:210)
at com.easytoo.union.impl.UnionPayDeviceImpl.main(UnionPayDeviceImpl.java:215)

my c + + compiler uses the MinGW.
see this is probably the reason for the error could not find the corresponding method . Is how it happened , we hope to help it, have dragged on for a few days , the company gave pressure ah
------ Solution ------------------ --------------------------
http://blog.csdn.net/niuxinlong/article/details/4176612
look UnionPayDeviceImpl.java: 210, UnionPayDeviceImpl.java: 215 is not the time to call for mass participation wrong !

------ Solution ------------------------------------ --------
hello , is compiled parameter is not set
See http://www.myexception.cn/eclipse/1473146.html
------ For reference only ----------------- ----------------------
UnionPayDeviceImpl.java: 210, UnionPayDeviceImpl.java: 215
------ For reference only ---------------------------------------
missing dll correspondence should be invoked files , it is recommended to view it, you should put the corresponding dll files into a directory and similar java or put C: \ windows \ under system32.
------ For reference only -------------------------------------- -
hello , is compiled parameter is not set See
http://www.myexception.cn/eclipse/1473146.html

没有评论:

发表评论