/**
* this class is a simple example that uses a native function
* @author renga
**/
public class jniexample {
static {
system.loadlibrary( "jni" );
}
/**
* native method declaration. just returns the string "hello world from jni!"
* @return a string
**/
public native string sayhello();
/**
* main method
* @param args command-line arguments
**/
public static void main( string[] args ) {
// create a new jniexample object
jniexample temp = new jniexample();
// invoke the native method
system.out.println( temp.sayhello() );
}
}
闽公网安备 35060202000074号