Corrections to Chapter 19 of Java Secrets, Mixed Language Programming with Native Methods

p. 637: At the top of the page, change "to br sure" to "to be sure".

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);

o


[ Java Secrets Corrections | Java Secrets Home Page | Table of Contents | Examples | About the CD | Order ]

Copyright 1998 Elliotte Rusty Harold
elharo@sunsite.unc.edu
Last Modified November 1, 1998