When the macbook system configures tomcat, it appears:
Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variables is needed to run this program
How to deal with it
First make sure the JDK is installed and the Java environment variables are configured properly.
Verification method:
Enter in the terminal
It is normal if the corresponding version number is displayed, otherwise please install JDK and configure Java environment variables first.
Reference address:
Set up Java development environment on MacBook Pro
tomcat runs in jvm, you need to install jdk first.