Windows – Window can not find catalina.bat, even catalina is exist

filesystemstomcatwindows

When I try start tomcat in IDEA it gives me the below error message:

Error running Tomcat 8.0.35: Cannot run program
"D:\Tomcat\apache-tomcat-8.0.35\bin\catalina.bat" (in directory
"D:\Tomcat\apache-tomcat-8.0.35\bin"): CreateProcess error=2, The
system cannot find the file specified

The weird thing is that I can run catalina.bat from a command line, but the Windows graphical user interface does not work:

Error message from Windows

CMD and other info

As we see, catalina.bat exists and the authority is also ok but just cannot run it.

Could someone check this and provide some suggestions?

BTW, all Tomcat's bat files can run from the CMD line but they give me the same "not exist" error given in the graphic interface.

Best Answer

Follow "My Computer" > "Properties" > "Advanced" > "Environment Variables" > "Path" and add "D:\Tomcat\apache-tomcat-8.0.35\bin" to your PATH variable please.