简体   繁体   English

c#使用Windows窗体调用jar文件

[英]c# call jar file with windows form

I'm working with apktool GUI but i don't know how to call jar file with a windows form. 我正在使用apktool GUI,但我不知道如何使用Windows窗体调用jar文件。 I just want to make the apktool GUI program so i don't have to run cmd and type the command and file path. 我只想制作apktool GUI程序,所以我不必运行cmd并键入命令和文件路径。

Here is the code i want to make. 这是我要制作的代码。

call apktool 致电apktool

Process.Start(java, String.Join(" ", args)); 

Prepare the arguments 准备参数

string[] args = { "-jar",
apktool, "d",
"-f ",
filename,
decompiled }; 

apktool = The path to apktool apktool = apktool的路径

filename = the APK file name 文件名= APK文件名

decompiled = The Apktool create a Decompiled folder. 反编译= Apktool创建一个反编译文件夹。 Decompiled is a folder name. 反编译的是文件夹名称。

"d" = decompile mode “ d” =反编译模式

"-f" = overwrites file if it exist (force) “ -f” =覆盖文件(如果存在)(强制)

The final command should look like 最终命令应如下所示

-jar c:\apktool.exe d -f c:\bf.apk c:\decompiled

but i want the program to call the jar file on any location and not just in C:/ 但我希望程序在任何位置而不是仅在C:/上调用jar文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM