
commit
f2b5734b58
4 changed files with 44 additions and 0 deletions
@ -0,0 +1,4 @@ |
|||||
|
syntax: glob |
||||
|
|
||||
|
*.class |
||||
|
*.jar |
@ -0,0 +1,13 @@ |
|||||
|
import org.pEp.jniadapter.*; |
||||
|
|
||||
|
public class Test { |
||||
|
public static void main(String[] args) { |
||||
|
try (Engine pEp = new Engine()) { |
||||
|
// using pEp engine
|
||||
|
} |
||||
|
catch (pEpException e) { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,21 @@ |
|||||
|
package org.pEp.jniadapter; |
||||
|
|
||||
|
public class Engine implements AutoCloseable { |
||||
|
static { |
||||
|
System.loadLibrary("pEpJNI"); |
||||
|
} |
||||
|
|
||||
|
protected native void init() throws pEpException; |
||||
|
protected native void release(); |
||||
|
|
||||
|
private long handle; |
||||
|
|
||||
|
public Engine() throws pEpException { |
||||
|
init(); |
||||
|
} |
||||
|
|
||||
|
public void close() { |
||||
|
release(); |
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,6 @@ |
|||||
|
package org.pEp.jniadapter; |
||||
|
|
||||
|
public class pEpException extends Exception { |
||||
|
|
||||
|
} |
||||
|
|
Loading…
Reference in new issue