I want to execute WordPad using the code below.
It runs fine on my pc. But failed to run on other pcs.
String program = "C:\\Program Files\\Windows NT\\Accessories\\wordpad";
String file = "srcFiles\\Resources\\readme.rtf"; //This is the path to the file i want to open with wordpad.
Runtime load = Runtime.getRuntime();;
try{
load.exec(program + " " + file);
}catch(java.io.IOException ioe){
System.out.println(ioe.getMessage());
}
Please what am i getting wrong?