Hi,
My requirement is that i need to run batch file that is present in remote system from local machine. i am having the following code. But it is giving the following error :Path not correct". I have the ip address of the machine, and i have given the batch file as public share and share name is dsc.
ip address of the machine is 16.181.37.28 Share name is "dsc" I am also pasting the code. I know that the path is wrong. Please tell me how can i give the exact path.
/* * To change this template, choose Tools | Templates * and open the template in the editor. */
/** * * @author padmaja */
import java.io.*; class Test{ public static void main(String arg[]){ try{ String command = "cmd /C start 16.181.37.28/dsc/StartVisTsDataCenterMySql-log.bat"; Runtime rt = Runtime.getRuntime(); Process pr = rt.exec(command);
}catch (IOException e) { e.printStackTrace(); } } }