Answer the question
In order to leave comments, you need to log in
Get a response from a closed program (C#/Java)?
Good time of the day.
1) From the java code, you need to start the console application by passing a string to it (the xml address that contains the settings).
2) After the program finishes its work and closes (the console application acts as an xml -> word doc converter), you need to receive a response about the processing status. Whether everything is successful or what jambs.
1) the first thing I did:
public class MyClass {
public static void main (String[] args) throws Exception {
Runtime.getRuntime (). exec("cmd.exe /c start D:\\program1.exe 55");
}
}
namespace program1
{
class Program
{
static void Main(string[] args)
{
try
{
if (args.Length != 0)
{
foreach (string s in args)
{
Console.WriteLine(s);
}
}
else
{
Console.WriteLine("Возникла ошибочка!");
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question