p. 638: In the secand paragraph, change "inside a C native metho;" to "inside a C native method".
p. 640: The Java program referred to incorrectly as Listing 19-8 is missing. Here it is
package numbers;
public class RevisedSums {
static {
System.loadLibrary("numbers");
}
public static void main(String[] args) {
Sums s = new Sums();
int result = s.firstNonSquareSum();
System.out.println(result + " is not the sum of three squares.");
}
public native int firstNonTripleSum(int power);
}
p. 651: Change
LongVector = (*jne)->NewObject(jne, LongID, "<init>", size);
to
LongVector = (*jne)->NewObject(jne, LongID, VectorConstructorID, size);
p. 654: The signature for NewStringUTF has two arguments, not three. You do not need to pass the string length to the function. Its signature should read:
jstring NewStringUTF(JNIEnv *jne, const char *bytes);
The foillowing code fragment should be:
jstring jhello;
char* chello = "Hello";
hello = (*jne->) NewStringUTF(jne, chello);