Disadvantages of using Java Native Interface

前端 未结 6 1119
南旧
南旧 2020-12-29 13:46

I can not get these two disadvantages of using JNI. I want to know more about them:

  • Difficult to debug runtime error in native code

  • Errors i

6条回答
  •  天涯浪人
    2020-12-29 14:01

    You'll lose one of the advantages of using Java, your application is not platform independent anymore, and many other problems implied from that: maybe you'll be supporting DLLs for Windows and .so files for Linux, each one of them with their own compiler, different debugging tools, different dependencies and maybe different bugs, more complexity for your build process, more code to test, etc.

提交回复
热议问题