This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Running the Java command line file error is the same as running the local CMD window. What is the reason? This is the first time I have used this tool. I am very unfamiliar with it. Is there any better way to run Java command line files?
The "is not recognized as an internal or external command, operable program or batch file." error is thrown when Windows can't find the executable, in your case "Java.exe". This is usually because the path to your executable is not the %path% environment variable.
Here are some things you can look at.
1. When you run "java -jar C:\Users\FannyWF\Desktop\testFlow\test.jar" directly from the command line, do you run it from a custom command shell that setsup a temporary path? if so, create a batch file that does a Set command before Java and call that from the Run tool.
2. add the complete path to the Run command "C:\Program Files\Java\JDK 9.0.1\bin\Java.exe -jar C:\Users\FannyWF\Desktop\testFlow\test.jar"
3. if this runs, check your Windows environment variables and add to the path the %Path% variable. Check out the second part of this article for instructions on how to do this.
Great. The second step is very effective. You can run the bat file. This is because I forgot to add the absolute path of jdk. I don't think it's necessary to consider this problem after configuring environment variables. I'm so foolish. Thank you very much, but a new problem has arisen.
Error: Run Command (5): The external program "C:\Users\FannyWF\Desktop\testFlow\run.bat" returned an error code: -1073741510