I have written my first RMI/JNI based sample program. I load the applet which gets the stub from the RMI server properly and when it invokes native methods in the remote object, the following error message is shown: "java.langAbstractMethodError". How can I fix this error?

Davanum Srinivas

Native methods should be called remotely. Define the native method as private and add a public helper function that calls this native method. Here's a snippet from an excellent article on JavaSoft at http://developer.java.sun.com/developer/TechTips/1999/tt1214.html

//public remotely-callable 
//method that finds an entry
public String findEntry(String w) {
    return findEntry0(w);

// native C++ method to actually 
//look up an entry
private native static String findEntry0(String w);