KM is not starting Tomcat via Shell Script

I have a KM Macro which is supposed to start Tomcat 8 at login or via status menu option, but neither start Tomcat 8.

The command that runs in the “Execute Shell Script” is simple:


Running this command directly in Terminal does start Tomcat 8.



What error are you getting? Adjust the action to display the output, including any error message, in a window.

Hi Peter,

I had already enabled both those settings.

The message in the "Keyboard Maestro - Shell Script Results" window is:

Tomcat started.


But Tomcat is not running. Again, running this exact same shell command at the command line does start Tomcat correctly.

Maybe you can try this yourself?

Download and installing Tomcat is easy.

Thanks in advance,

Do you need to run this as admin? If so, you’ll need to update your sudoers file to let you run it as admin without a password.

No, it runs fine (at the command line) as the regular user.


Clearly, it is running the command, and then the command is printing “Tomcat started.” and then it is not continuing.

Check the Tomcat logs.

Probably it is not set correctly because it is missing environment variables that are configured in your terminal.

See the section on Path in Shell Script on the wiki, and keep in mind the same thing applies to all other environment settings.

So it might be running the wrong version of tomcat, or maybe there are other environment variables that affect the process.

Fixed it.

Seemed like a strange issue.

FIX: Upgraded to Tomcat 9 and pointed JAVA_HOME to Java 10 JRE. Error gone and KM is now starting Tomcat.

The error using an older version of Tomcat, Tomcat 8, was:

…/Library/apache-tomcat-8.0.26/endorsed is not supported. Endorsed standards and standalone APIs in modular form will be supported via the concept of upgradeable modules.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Thanks for all the ideas and replies. :slight_smile: