Introducing JNI

The Java Native Interface (JNI) allows you to write code that utilizes code written in programming languages other than Java. If you consider the maxim “Write once, run anywhere,” you may wonder why you might want to use non-Java code. There are a number of scenarios where it is preferable or even wise to use non-Java code:

  • When you require functionality not supported by the standard Java class library. For example, you may need to access parts of the Win32 API.

  • When you want to reuse a library or application written in another programming language, so you don't have to rewrite these libraries or applications. For example, many ...

Get Sams Teach Yourself J2EE™ in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.