public static void Encrypt()
{
//进程启动信息
ProcessStartInfo startInfo = new ProcessStartInfo()
{
UseShellExecute = false,
CreateNoWindow = true,
//RedirectStandardOutput = true,
WindowStyle = ProcessWindowStyle.Hidden,
FileName = "java.exe",
Arguments = @"-jar F:\test\encrypt.jar F:\test\old.apk F:\test\new.apk"
};
//启动进程
using (Process process = Process.Start(startInfo))
{
process.WaitForExit();
}
}说明:不能设置RedirectStandardOutput=true,否则C#程序会一直停在这个操作不能退出。
评论(0)
暂无评论。