当我运行此代码时:
package jni_2;
public class Min2 {
static {
System.loadLibrary("kernel32");
}
public native long FlushProcessWriteBuffers();
public static void main(String[] args) {
Min2 c = new Min2();
c.FlushProcessWriteBuffers();
}
}
我得到这个例外:
Exception in thread "main" java.lang.UnsatisfiedLinkError: jni_2.Min2.FlushProcessWriteBuffers()J
at jni_2.Min2.FlushProcessWriteBuffers(Native Method)
at jni_2.Min2.main(Min2.java:14)
Java Result: 1