dabuddha
Lifer
Sorry for posting here but I need some quick "advice" on what's going wrong here:
I'm trying to get this program to work. It does various things but the problem that im running into is that I need it to run 2 different unix scripts. Here is one method:
then a few lines later, I run this method:
If you need anymore info, please ask. I modified the code a little to take out some stuff that shouldn't be publicized 🙂
I'm trying to get this program to work. It does various things but the problem that im running into is that I need it to run 2 different unix scripts. Here is one method:
This works fineprivate void extractData(String Id, String extractFileName)
{
Runtime runtime = Runtime.getRuntime();
EnvHelper envHelper = new EnvHelper();
String commandString = dirString + "/run_extract " + Id + " " + extractFileName;
// System.out.println(header + "making system call:" + commandString + ":"😉;
try
{
Process process = runtime.exec(commandString);
}
catch(IOException e)
{
e.printStackTrace();
}
}
then a few lines later, I run this method:
It prints out the system call and I can run the system call manually. But it never makes the call. Could it be because I created two process objects or two runtime objects?private void sendXml(String xmlFileName, String Id)
{
Runtime runtime = Runtime.getRuntime();
String productId = "1";
EnvHelper envHelper = new EnvHelper();
String dirString = envHelper.getProperty("BIN_DIR"😉;
String commandString = dirString + "/run_data_sender " + xmlFileName + " " + Id;
System.out.println("making system call:" + commandString + ":"😉;
try
{
Process process = runtime.exec(commandString);
}
catch(IOException e)
{
e.printStackTrace();
}
return;
}
If you need anymore info, please ask. I modified the code a little to take out some stuff that shouldn't be publicized 🙂