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();;
load.exec(program + " " + file);
Uhm, don't use Runtime OR ProcessBuilder for this, for one, see the API docs for Desktop.open. Then, also, make sure the file is really where you THINK it is AND that your program is running with the "currentWorkingDirectory" that you THINK it is.