O'Reilly logo

Component Development for the Java™ Platform by Stuart Dabbs Halloway

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6.3. Finding and Loading Native Code

Bridging between Java and native code is both a logical and a physical problem. The logical problem is one of disparate naming and typing systems. To solve this problem, JNI defines a complete, unambiguous mapping from Java names and types to C++ names and types.[2] The physical problem is finding and loading the appropriate native binary. The process of finding and loading native code is very similar to the process of loading Java classes. Both processes are well defined, but they tend to produce cryptic errors and be poorly understood by developers. This section covers the logical and physical mapping between Java and native code, and it shows how to troubleshoot the most common problems.

[2] JNI does not ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required