O'Reilly logo

Core Java™ Volume II–Advanced Features, Eighth Edition by Gary Cornell, Cay S. Horstmann

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

Chapter 12. Native Methods

<feature><title></title> <objective>

CALLING A C FUNCTION FROM A JAVA PROGRAM

</objective>
<objective>

NUMERIC PARAMETERS AND RETURN VALUES

</objective>
<objective>

STRING PARAMETERS

</objective>
<objective>

ACCESSING FIELDS

</objective>
<objective>

ENCODING SIGNATURES

</objective>
<objective>

CALLING JAVA METHODS

</objective>
<objective>

ACCESSING ARRAY ELEMENTS

</objective>
<objective>

HANDLING ERRORS

</objective>
<objective>

USING THE INVOCATION API

</objective>
<objective>

A COMPLETE EXAMPLE: ACCESSING THE WINDOWS REGISTRY

</objective>
</feature>

While a “100% Pure Java” solution is nice in principle, there are situations in which you will want to write (or use) code written in another language. (Such code is usually called native code.) ...

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