alasalmo alikum
i'm facing a problem in opening jar file(by execute batch file which contains java -jar command) in c#
here is the code:
string filepath = Server.MapPath("test.bat");
ProcessStartInfo psi = new ProcessStartInfo("cmd.exe");
psi.UseShellExecute = false;
psi.RedirectStandardOutput = true;
psi.RedirectStandardInput = true;
psi.RedirectStandardError = true;
Process proc = Process.Start(psi);
StreamReader sr = File.OpenText(filepath);
StreamWriter sw = proc.StandardInput;
StreamReader sre = proc.StandardError;
while (sr.Peek() != -1)
{
sw.WriteLine(sr.ReadLine() + Environment.NewLine);
}
TextBox1.Text = sre.ReadLine();
sr.Close();
proc.Close();
sw.Close();the following message appears
Unable to access jarfile *.jar
what do you think the problem is ???
