-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathJNI_Test.java
More file actions
24 lines (20 loc) · 540 Bytes
/
Copy pathJNI_Test.java
File metadata and controls
24 lines (20 loc) · 540 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
public class JNI_Test{
public void sgx_hook(){
new JNI_Test().print();
}
private native void print();
static {
// System.loadLibrary("JNI_Test");
}
public static int sgx_hook_1(){
double x = 9.997;
return (int)Math.round(x);
}
public static void main(String[] args){
int k = sgx_hook_1();
assert( k == 10):"JNI Call fail";
System.out.println(k);
//JNI_Test a = new JNI_Test();
//a.sgx_hook();
}
}