Using non-Java code

Source: Internet
Author: User
Tags versions

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.