简体   繁体   中英

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. I just want to make the apktool GUI program so i don't have to run cmd and type the command and file path.

Here is the code i want to make.

call apktool

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

Prepare the arguments

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

apktool = The path to apktool

filename = the APK file name

decompiled = The Apktool create a Decompiled folder. Decompiled is a folder name.

"d" = decompile mode

"-f" = overwrites file if it exist (force)

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:/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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