I would like to know the correct syntax that would get C# to call on a Java Jar file.
For example, I have a jar file that I typically call as follows:
"java -jar exchgPub.jar 10.10.5.73 7676 eBudgetExchange"
I want C# to execute that command.
The code that follows, is an attempt to try and execute the command via a batch file, but nothing happens (i.e. no error, no execution of the jar, nothing...):
+ m_inMsg.getJMSIP() +
+ m_inMsg.getJMSPort().ToString() +
+ m_inMsg.getJMSTopicName();
System.Diagnostics.ProcessStartInfo psi =
new System.Diagnostics.ProcessStartInfo(pgmPath);
*/
System.Diagnostics.
psi.WorkingDirectory = m_launchDir;
psi.FileName =
psi.Arguments = m_inMsg.getJMSIP() +
psi.RedirectStandardOutput =
psi.WindowStyle = System.Diagnostics.
psi.UseShellExecute =
{
exchgPub = System.Diagnostics.
System.IO.
exchgPub.WaitForExit(2000);
logMessageToFile(
}
exchgPub.Close();
So any ideas?
Thanks in advance.
-Paul