Hi..
Could somebody please tell me how to run a java program from another one when they are in separate packages? The issue is that the java package from which I am trying to access it is not the same as the class file I need to access.
This is the code I am using now :
try{
Runtime runtime = Runtime.getRuntime();
File destDir = new File("/Users/abc/minion/trunk/translator/bin");
String[] args1 =
new String[]{"sh","-c",
"java EssencePrimeTranslator",
"/Users/abc/trans/problems/sokoban/modeltest.cm",
"/Users/abc/trans/problems/sokoban/modeltest.param",
"/Users/abc/trans/problems/sokoban/modeltest.minion"};
runtime.exec(args1,null,destDir);
}
catch(Exception exp){
System.out.println("Exception in run : " + exp.toString());
}
Thanks in advance for the help!!!
Could somebody please tell me how to run a java program from another one when they are in separate packages? The issue is that the java package from which I am trying to access it is not the same as the class file I need to access.
This is the code I am using now :
try{
Runtime runtime = Runtime.getRuntime();
File destDir = new File("/Users/abc/minion/trunk/translator/bin");
String[] args1 =
new String[]{"sh","-c",
"java EssencePrimeTranslator",
"/Users/abc/trans/problems/sokoban/modeltest.cm",
"/Users/abc/trans/problems/sokoban/modeltest.param",
"/Users/abc/trans/problems/sokoban/modeltest.minion"};
runtime.exec(args1,null,destDir);
}
catch(Exception exp){
System.out.println("Exception in run : " + exp.toString());
}
Thanks in advance for the help!!!