package com.perforce.client;
//javah -classpath "c:\src\perforce\paul_krause\perforce\api\java\p4jni" -o "c:\src\perforce\paul_krause\perforce\api\include\JniClient.h" com.perforce.client.JniClient
import java.util.HashSet;
import java.io.IOException;
import java.util.Properties;
import java.util.Set;
/**
* @author Paul Krause <pkrause@soundbite.com>
* @version $Id: //guest/paul_krause/perforce/api/java/p4jni/com/perforce/client/JniClient.java#2 $
*/
public class JniClient {
public void finalize() throws Throwable {
try {
p4destroy();
} finally {
super.finalize();
}
}
public void p4cmd (String command, String[] args) throws IOException {
byte[][] argv = new byte[args.length][];
for (int i=0; i<argv.length; argv[i] = args[i++].getBytes());
p4cmd(command.getBytes(), argv);
}
// native interface for p4api
private native long p4create();
private native void p4cmd (byte[] command, byte[][] argv) throws IOException;
public native String p4change() throws IOException;
public native void p4connect(Properties env) throws IOException;
public native void p4close() throws IOException;
private native void p4destroy() throws IOException;
private final long clientApiHandle = p4create();
static {
System.loadLibrary("p4jni"); // bridge generated from JniClient.java
}
}// JniClient
# |
Change |
User |
Description |
Committed |
|
#2
|
2363 |
Paul Krause |
JNI again |
|
|
#1
|
1713 |
Paul Krause |
reorg java workspace into multiple projects |
|
|
//guest/paul_krause/perforce/api/java/com/perforce/client/JniClient.java |
#1
|
764 |
Paul Krause |
checkpoint - first working compile |
|
|