The Java language and its standard APIs (application programming interfaces) are more than adequate for writing applications. In some cases, however, you must use a non-Java encoding. For example, we sometimes have access to the proprietary features of the operating system, dealing with special hardware devices, reusing existing non-Java interfaces, or using "time-sensitive" code snippets, and so on. Communication with non-Java code requires specialized support from compilers and "virtual machines" and additional tools to map Java code to non-Java code (there is also an easy way to do this: in chapter 15th, "A Web Application" section, There is an example of how to use standard input output to connect to non-Java code. At present, different developers provide us with different scenarios: Java 1.1 has "Java inherent interface" (Java Native interface,jni), Netscape proposed its own "Java Runtime interface" (Java Runtime Interface) program, and Microsoft provides j/direct, "Source Interface" (Raw Native Interface,rni) and java/com integration program.
The different attitudes of developers on this issue are very bad for programmers. If the Java application must invoke an intrinsic method, the programmer may want to implement different versions of the inherent method-the platform that the application runs on. Programmers may actually need different versions of Java code, as well as different Java virtual machines.
Another scenario is CORBA (Common Object Request Broker architecture), an integration technology developed by the OMG (Object Management Group, a non-profit company association). CORBA is not a part of any language, just a specification of universal communication bus and service. It enables the ability to "interoperate" between objects implemented in different languages. The name of this communication bus, called the Orb (Object request agent), is a product implemented by other developers, but is not part of the Java language specification.
This appendix provides an overview of jni,j/direct,rni,java/com integration and CORBA. But there is no deeper discussion, and even sometimes it is assumed that the reader has a certain degree of understanding of the concepts and techniques involved. But in the end, we should be able to compare the different methods and choose the most appropriate one according to the problem we want to solve.