📄 jniexample.java
字号:
/**
* 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() );
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -