Advantages and disadvantages of using JNI

Advantages and disadvantages of using JNI

Advantages of JNI:

1. JNI enables one to write programs in native language or method when an application cannot be written entirely in the Java programming language.
2. It is also used to modify an existing application which is written in another programming language so that it can be accessible to Java applications.
3. It allows all Java applications to access performance- and platform-sensitive API implementations functionality in a safe and platform-independent manner.
4. JNI helps to address the interoperability issues.

Disadvantages of JNI:

1. An application that relies on JNI loses the platform portability that Java offers.
2. The JNI framework does not provide any automatic garbage collection for non-JVM memory resources allocated by code executing on the native side.
3. Error checking is a must or it has the potential to crash the JNI side and the JVM.
4. Difficult to debug runtime error in native code.
Difference between ServletsContext and ServletConfig
ServletConfig: It defines how a servlet is configured. ServletConfig is implemented by the servlet container to initialize a single servlet using init ()....
Why is HTTP protocol called as a stateless protocol?
HTTP is called a stateless protocol because in this each command is executed independently, without any knowledge of the commands...
Relation between class and object
Class and object - A class defines the properties and behavior for the objects represented by the abstraction. Abstraction is a property of object oriented programming...
Post your comment