Another question in quick succession but this has to be a really obvious error that I am not seeing. I've written some code to run a batch file below but I'm getting an error message saying it cannot find the file but I can assure you that the file does exist in the directory!
public class Pull {
public void pullData() throws IOException {
ProcessBuilder pb = new ProcessBuilder("adb.bat");
File f = new File("C:\\");
pb.directory(f);
Process p = pb.start();
}
public static void main(String[] args) throws IOException {
Pull pull = new Pull();
pull.pullData();
}
}
and here is the error message
Exception in thread "main" java.io.IOException: Cannot run program "adb.bat" (in directory "C:\"): CreateProcess error=2, The system cannot find the file specified