我在res / raw文件夹中有licpuminer.so。
String libFile = "android.resource://com.example.suraj.myapplication/raw";
String url = "abc.com";
String user = "user";
String password = "pass";
Boolean isNeon = false;
try {
String str = libFile;
str = new StringBuilder(String.valueOf(isNeon ? new StringBuilder(String.valueOf(str)).append("/libcpuminerNEON.so ").toString() : new StringBuilder(String.valueOf(str)).append("/libcpuminer.so ").toString())).append("--algo=scrypt -o ").append(url).append(" -u ").append(user).append(" -p ").append(password).append(" -t ").append(thread).toString();
Process process = Runtime.getRuntime().exec(str, new String[]{"LD_LIBRARY_PATH=" + libFile + ":$LD_LIBRARY_PATH"}, new File(libFile));
Log.e("errorE", str);
Log.e("errorE", process.getClass().getName());
} catch (Exception e) {
e.printStackTrace();
Log.e("errorE", "error");
}
}
我正在
java.io.IOException:运行exec()时出错导致: java.io.IOException:没有这样的文件或目录