FieldAccess.java
contains a class with one class integer member variable and an instance string member
variable. This simple program calls the native method accessFields, which prints out
the value of these two member variables and sets them to new values.
See the the related native method implementation:
FieldAccess.c.
For supporting information see
The
Java Tutorial Continued: Java Native Interface.