4

I am trying to deploy the web application using tomcat 9.0. I am getting below error:

 Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program

after executing .\catalina.bat run command

user3526665
  • 81
  • 1
  • 1
  • 6

1 Answers1

3

Tomcat needs the JAVA_HOME and JRE_HOME environment variables. You need to setup your JAVA_HOME and JRE_HOME environment variables as shown step by step in the link below:

For Windows: https://www.mkyong.com/java/how-to-set-java_home-on-windows-10/

For Ubuntu: https://www.mkyong.com/java/how-to-install-java-jdk-on-ubuntu-linux/

I hope this solves your problem.

Ali
  • 152
  • 9
  • The ubuntu link does not even mention JRE_HOME. I suggest following the answer posted here :- https://stackoverflow.com/a/59012171/1616719 – KayCee Aug 18 '23 at 11:05