JNI Calls different in C vs C++?

前端 未结 4 989
情深已故
情深已故 2020-12-09 02:07

So i have the following code in C that utilizes Java Native Interface however i would like to convert this to C++ but am not sure how.

 #include 

        
4条回答
  •  有刺的猬
    2020-12-09 02:32

    It's been a while since I touched standard C++ but I'm gonna try it anyway.

    "(*env)->" looks weird to me. Shouldn't that simply be "env->" ?

    Maybe I'm wrong and it is supposed to work, but why make things more complicated anyways?

提交回复
热议问题