new libsystem

This commit is contained in:
Max Lv
2013-01-08 21:21:19 +08:00
parent ff206e5643
commit a5014a620b
9 changed files with 107 additions and 20 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ import java.io.FileDescriptor;
public class Exec {
static {
System.loadLibrary("exec");
java.lang.System.loadLibrary("exec");
}
/**
@@ -210,7 +210,7 @@ public class ShadowsocksService extends Service {
final String cmd = String.format(BASE +
"shadowsocks -s \"%s\" -p \"%d\" -l \"%d\" -k \"%s\" -m \"%s\"",
appHost, remotePort, localPort, sitekey, encMethod);
Node.exec(cmd);
System.exec(cmd);
}
}.start();
}
@@ -222,7 +222,7 @@ public class ShadowsocksService extends Service {
final String cmd = String.format(BASE +
"polipo proxyPort=%d socksParentProxy=127.0.0.1:%d daemonise=true pidFile=\"%s\" logLevel=1 logFile=\"%s\"",
localPort + 1, localPort, BASE + "polipo.pid", BASE + "polipo.log");
Node.exec(cmd);
System.exec(cmd);
}
}.start();
}
@@ -38,9 +38,9 @@
package com.github.shadowsocks;
public class Node {
public class System {
static {
System.loadLibrary("node");
java.lang.System.loadLibrary("system");
}
public static native void exec(String cmd);