1

I have created Local Tomcat (8.5.15) run configuration in IntelliJ IDEA (2019.2). I am running Windows 10. When I try to run the configuration, I get error:

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

Environment variables are set:

JAVA_HOME=C:\Program Files\Java\jdk1.8.0_221
CATALINA_HOME=C:\apache-tomcat-8.5.15

%JAVA_HOME%\bin and %CATALINA_HOME%\bin added to PATH

In Run/Debug Configurations -> Startup/Connection, Startup script and Shutdown script are set to valid paths:

C:\apache-tomcat-8.5.15\bin\catalina.bat run
C:\apache-tomcat-8.5.15\bin\catalina.bat stop

When run from terminal, Tomcat starts correctly.

I have replaced catalina.bat with some mock script (just echo sth) as Startup script in run configuration, got the same error. No other logs are visible in IntelliJ.

tommym19
  • 11
  • 1

1 Answers1

0

Changing system environment variable ComSpec does the job. In my case I had two cmd.exe configured 32 bit and 64. I removed 32 bit and it started working. Look out as after edit - there might be ; that also need to be removed. Screen capture of my settings

B--rian
  • 5,578
  • 10
  • 38
  • 89
JackK
  • 1