Java 2 Platform, Standard Edition (J2SE) 1.4x uses a new StrictMath package to perform mathematical calculations, but many of these math routines are much slower than the corresponding routines in J2SE 1.3. Luckily, Java Native Interface (JNI) enables you to circumvent this serious performance bottleneck. (1,000 words; August 15, 2003)
Embedding Java code into a Unix application developed in C or C++ can create problems related to GUIs or threads synchronization. In this article, Thierry Manfe implements a solution that relies on a good understanding of the Unix APIs and robust software architecture. (2,400 words)
Preserving existing investments in non-Java technology is critical to the acceptance of Java technology. A primary way to connect Java to existing code is through the use of native methods. This tip shows you the steps necessary to build support for and use native methods. (1,080 words)
This tip shows how a C/C++ native method can use the Java Native Interface (JNI) to populate an object's data fields when a reference to that object is passed as an argument to the native method. The article also shows how a native method can create an object and populate its data fields before returning the object to Java. (1,200 words)