Tomcat is not running even though JAVA_HOME path is correct

前端 未结 18 2224
情深已故
情深已故 2020-12-09 16:07

When I am trying to run tomcat using startup.bat I get the following error,

The JAVA_HOME environment variable is not defined correctly
This env         


        
18条回答
  •  难免孤独
    2020-12-09 16:45

    Try installing java somewhere else - in a directory without spaces. Set again the JAVA_HOME variable and try again. I remember Tomcat had some problems on Window XP with spaces if any variables it was using while starting contained spaces. Maybe it's similar with Windows 7.

    I remember I had to change some lines in Tomcat java classes which were handling Tomcat startup.

    @Edit: Luciano beat me to noticing it but you should also remove bin from JAVA_HOME

    @Edit: I also remember that another fix (didn't test it myself, though) was to set JAVA_HOME to the shorthand version e.g. C:\Progra~1\Java\jdk1.6.0_25

提交回复
热议问题