Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 错误解决 主要发生在Tomcat与jdk环境新部署时候 解决方法:确认JAVA_HOME and JRE_HOME 环境变量已经配置,重启计算机或者注销当前用户重新登陆即可。 更改 setclasspath 方法也可以解决~~~~~