Im getting “dig is not recognized as an internal or external command” when I try to run a batch file from java
问题 import java.io.*; public class Main { public static void main(String[] args) throws IOException, StringIndexOutOfBoundsException { Runtime.getRuntime().exec("cmd /c start C:\\dig-files3\\query3.bat"); } } I'm trying to launch a batch file through a java program but I get a 'dig not recognized as an internal or external command ...' message in the cmd screen. However when I double click on the batch file in the window it runs fine. How can I fix this? Here is the batch file's content: SET /a