Explain the advantages and disadvantages of using JNI.Advantages of JNI :
- Using JNI, we can access C and C++ code which adds performance boost to JAVA.
- JNI allows JAVA to access some hardware features using other languages like C and C++.
Disadvantages of JNI :
- JNI uses native languages which mean it has portability issue.
- Code debug is big problem for the developers who use JNI features in JAVA.Explain the advantages and disadvantages of using JNI.Advantages :
- Use the existing library that was previously written in another languages.
- Use of Windows API functions.
- Increasing the speed of execution.
- Invoke API functions from server product that is developed in C or C++ from a Java client.
Disadvantages :
- Write Once Run Anywhere is not possible.
- Run time errors debugging is difficult in native code.
- An applet can not call a native method.
- Security risk is potential.
|