Disadvantages of using Java Native Interface

前端 未结 6 1121
南旧
南旧 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条回答
  •  -上瘾入骨i
    2020-12-29 14:06

    While this shouldn't be the case in theory, in practice, JNI based code I found to be very brittle -- I've found it to be a maintenance nightmare. Small changes or even just JVM upgrades cause obscure problems. This may have improved with more recent Java versions (I'm harking back to JDK 1.3 or earlier here).

提交回复
热议问题