windows服务器下启动tomcat8-出错Neither the JAVA_HOME nor the JRE_HOMEenvironment variable is defined At lea
2017-03-17 17:07
197 查看
D:\tomcat8\bin>startup
Neither the JAVA_HOME nor the JRE_HOMEenvironment variable is defined
At least one of these environment variableis needed to run this program
解决方法:
先看Tomcat的目录bin下startup.bat,它调用了catalina.bat,而catalina.bat则调用了setclasspath.bat。只要在(bin下)setclasspath.bat的开头声明环境变量.
加上红色的两句就好了(当然了路径 请填写你自己的)注意两个文件
一个是 JAVA_HOME
一个是 JRE_HOME
……......
rem
rem http://www.apache.org/licenses/LICENSE-2.0
rem
rem Unless required by applicable law oragreed to in writing, software
rem distributed under the License isdistributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANYKIND, either express or implied.
rem See the License for the specificlanguage governing permissions and
rem limitations under the License.
rem---------------------------------------------------------------------------
rem Set JAVA_HOME or JRE_HOME if notalready set, ensure any provided settings
rem are valid and consistent with theselected start-up options and set up the
rem endorsed directory.
rem---------------------------------------------------------------------------
set JAVA_HOME=D:\Java\jdk1.8
set JRE_HOME=D:\Java\jdk1.8.0_121
rem Make sure prerequisite environmentvariables are set
rem In debug mode we need a real JDK(JAVA_HOME)
if ""%1"" ==""debug"" goto needJavaHome
……
:end
exit /b 0
最后startup 启动tomcat成功
Neither the JAVA_HOME nor the JRE_HOMEenvironment variable is defined
At least one of these environment variableis needed to run this program
解决方法:
先看Tomcat的目录bin下startup.bat,它调用了catalina.bat,而catalina.bat则调用了setclasspath.bat。只要在(bin下)setclasspath.bat的开头声明环境变量.
加上红色的两句就好了(当然了路径 请填写你自己的)注意两个文件
一个是 JAVA_HOME
一个是 JRE_HOME
……......
rem
rem http://www.apache.org/licenses/LICENSE-2.0
rem
rem Unless required by applicable law oragreed to in writing, software
rem distributed under the License isdistributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANYKIND, either express or implied.
rem See the License for the specificlanguage governing permissions and
rem limitations under the License.
rem---------------------------------------------------------------------------
rem Set JAVA_HOME or JRE_HOME if notalready set, ensure any provided settings
rem are valid and consistent with theselected start-up options and set up the
rem endorsed directory.
rem---------------------------------------------------------------------------
set JAVA_HOME=D:\Java\jdk1.8
set JRE_HOME=D:\Java\jdk1.8.0_121
rem Make sure prerequisite environmentvariables are set
rem In debug mode we need a real JDK(JAVA_HOME)
if ""%1"" ==""debug"" goto needJavaHome
……
:end
exit /b 0
最后startup 启动tomcat成功
相关文章推荐
- tomcat 启动 报错Neither the JAVA_HOME nor the JRE_HOME environment variable is definedtemp
- tomcat启动报Neither the JAVA_HOME nor the JRE_HOME
- 解决Linux下启动Tomcat遇到Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- Linux下tomcat启动Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of
- 解决Linux下启动Tomcat遇到Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- tomcat启动报错:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable
- 启动Tomcat异常(Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of )
- Linux下Tomcat启动报错:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one
- 解决Linux下启动Tomcat遇到Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- 启动tomcat的时候,报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 的解决方案
- 【Linux】启动Tomcat遇到Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- 解决Linux下启动Tomcat遇到Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- linux安装tomcat Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- [转]Tomcat----Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- TOMCAT7.0看来要做的还真多~~Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- linux安装tomcat Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- Tomcat Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- Tomcat Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- 向linux中上传文件后,重启tomcat报错:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At le
- Tomcat Neither the JAVA_HOME nor the JRE_HOME environment variable is defined