blob: 34a869259b08d1d489ac9b00e1ac42d5d1cdab55 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
//
// JNIWrapper.java
//
// Created by Gregory Pierce on Wed Jul 23 2003.
// Copyright (c) 2003 __MyCompanyName__. All rights reserved.
//
import java.util.*;
public class JNIWrapper {
static {
// Ensure native JNI library is loaded
System.loadLibrary("hidinput");
}
public JNIWrapper() {
System.out.println("JNIWrapper instance created");
}
native void hidCreate();
native void hidDispose();
native void enumDevices();
native int native_method(String arg);
public static void main (String args[])
{
System.out.println("Started JNIWrapper");
JNIWrapper newjni = new JNIWrapper();
System.out.println("Creating HID engine");
newjni.hidCreate();
System.out.println("Enumerating devices");
newjni.enumDevices();
System.out.println("Disposing HID engine");
newjni.hidDispose();
System.out.println("Done");
}
}
|