I have two programs, and I have to call a program that is in a different place, that is, the talking caller is in d: // start and is called a program in f: // call. How to do this in java?
Can I use this method to implement in the 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(); }
source share