I have two programs and I have to call a program which is in different location i.e., say calling program is in d://start and called program is in f://call. How to do it in java?
Can I use this method to be implemented in calling program?
try
{
Process p = Runtime.getRuntime().exec(
new String[] {"cmd.exe", "/c", "F:/call.java"});
InputStream in = p.getInputStream();
OutputStream out = p.outputStream();
}
catch (IOException e)
{
e.printStackTrace();
}