Question

I want to run specific code with C# windows application on cmd(command prompt) for sign jar file. I used this code

System.Diagnostics.Process.Start(@"cmd", @"/K ""c:\program Files\Java\jdk1.6.0_23\bin\jarsigner.exe"" -keystore filepath.p12 filepath.jar ""alias_name""");

I encountered this error while I executing this code

Error:

'c:\program' is not recognized as an internal or external command,
operable program or batch file.

How can I solve this problem ?

Était-ce utile?

La solution

From the comments above, i understand this solves the issue:

System.Diagnostics.Process.Start(@"c:\program Files\Java\jdk1.6.0_23\bin\jarsigner.exe",
    @"-keystore filepath.p12 filepath.jar ""alias_name""");

Happy signing. ;-)

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top