C
Chris
All- I type the following into my command prompt and it works fine:
DogTrainingCommand.exe /text="Testing 123, Testing 123." /voice="dog"
(that is once I have done: cd C:/Program Files/PetTraining/T120)
However, when I try to automate this using ProcessBuilder in a java
app nothing happens? My program terminates as soon as I run it and I
get no output. Can you correct me in what I am doing wrong?
Thank you in advance for your time!
import java.io.IOException;
import java.io.*;
public class CmdPrompt {
public static void main(String args[])
{
try {
ProcessBuilder pb = new
ProcessBuilder("DogTrainingCommand.exe", "\\text = Testing 123,
Testing123", "\\voice = dog");
pb.directory(new File("C:\\Program Files\\PetTraining\
\T120"));
Process p = pb.start();
}
catch (IOException e)
{
}
}
}
DogTrainingCommand.exe /text="Testing 123, Testing 123." /voice="dog"
(that is once I have done: cd C:/Program Files/PetTraining/T120)
However, when I try to automate this using ProcessBuilder in a java
app nothing happens? My program terminates as soon as I run it and I
get no output. Can you correct me in what I am doing wrong?
Thank you in advance for your time!
import java.io.IOException;
import java.io.*;
public class CmdPrompt {
public static void main(String args[])
{
try {
ProcessBuilder pb = new
ProcessBuilder("DogTrainingCommand.exe", "\\text = Testing 123,
Testing123", "\\voice = dog");
pb.directory(new File("C:\\Program Files\\PetTraining\
\T120"));
Process p = pb.start();
}
catch (IOException e)
{
}
}
}