Skip to main content

Posts

Showing posts with the label JNDI

What Is JNDI?

What is a naming service? Naming services map objects with names. It maps a reference to an object by a user friendly name. For example a machine maps its ip address. The association of an object with a name is called 'binding'. Examples : Domain Naming Service, File systems. What is a directory service? Searching for files and directories done by providing Directory services. A directory service is a set of names. The user and resource information and machine addresses are summarized by directory service. For example, for a given user name, the service returns the attributes of the user such as telephone no, email address etc. A directory service use the databases that specialized and hierarchical in design.

Java Native Interface (JNI) Interview Questions

What is Native Interface in JAVA? Answer JNI is the mechanism used to invoke methods written in languages such as c and C++. You can write code using language like c and c++ and declare its native methods and can use the same method in java using JNI. JNI exposes JNI functions and pointers that can access java objects and methods. What is Native Interface in JAVA? Java Native Interface permits the developers to integrate the native code such as C or C++ into a java application. To take the advantages of C programming and implementing the Java GUI features together makes the applications more efficient and powerful. JNI is used to handle situations where the entire application can not be written in java. Explain the advantages and disadvantages of using JNI. Answer 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 lan...