I have been working on a GUI that does an assortment of tasks. The final and last task is to make copies of a 3dModel conversion program and a script file that is required to make the converter run and convert. The converter and the script file are moved to a user specified directory. The user specified directory contains all of the models that will be converted. The problem is, I can't get the GUI to boot the converter with the script file. To make the converter work, you need to pass two window's cmd commands but the commands need to occur from the same directory as the converter and script file. This is what I have tried to do:
The files have all ready copied to the correct directory. All I need is for the GUI to execute the "skmodel model_definition.txt" commands in the correct directory. What am I doing wrong?
Code:
String[] commands = new String[]{"cmd ",
"/c ",
"cd ",
smdDirectory.getPath(),
"skmodel ",
"model_definition.txt "};
try{
Process child = Runtime.getRuntime().exec(commands);}
catch(IOException e){}
The files have all ready copied to the correct directory. All I need is for the GUI to execute the "skmodel model_definition.txt" commands in the correct directory. What am I doing wrong?