using System.Diagnostics;
Process process = new Process();
//Path wherein Java is installed in your machine
process.StartInfo.FileName = "java.exe";
//.jar file to be executed
process.StartInfo.Arguments = @"-jar Sample.jar";
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.Start();
//Get the output from stream
Console.WriteLine(process.StandardOutput.ReadToEnd());
//in case of no error ExitCode will be zero
if(process.ExitCode)
{
//In case of error , get error description
string error = process.StandardError.ReadToEnd();
}
Console.WriteLine(error);
process.WaitForExit();
Subscribe to:
Post Comments (Atom)
Design a Zero Trust pipeline using Confidential Computing
Check out reference diagram to design a zero trust pipeline https://blogs.oracle.com/cloud-infrastructure/designing-zero-trust-and-resilie...
-
Ever wanted to have a people picker kind of control in Infopath form and that too in browser mode. Did i heard yes :) , well there is a Acti...
-
Am sure lot's of people would be wondering how to hide menu items of a list eg document libraries "Send to " menu item . In o...
-
I got this error for quite some time and i had no clue what was wrong in my page . Page consisted of only 2 panel controls . That's all ...
1 comment:
Thank you so much for the post. It is a great help for us! jvmhost
Post a Comment