windows 启动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

解决方法:

找到tomcat 安装目录bin下的setclasspath.bat文件,打开后,新加如下配置:

set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_241
set JRE_HOME=C:\Program Files\Java\jre1.8.0_241

新加红框配置,则重新启可以解决。

原文地址:https://www.cnblogs.com/marshal1983/p/12590850.html

时间: 2024-08-03 05:13:23

windows 启动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

昨天下了9.0.30版本的tomcat发现跑不动,在startup中pause了后提示  Neither the JAVA_HOME nor the JRE_HOME environment variable is defined  是因为缺少JAVA_HOME,配置到jdk的根文件夹就可以了. 过程中发现新的jdk中没有单独的jre文件夹了,这又让我在度娘哪里学到了可以在新的jdk中生成jre. 需要切换到jdk的跟目录下. 运行bin\jlink.exe --module-path jmod

解决Linux下启动Tomcat遇到Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

找不到JAVA_HOME路径,需要做以下变更: 找到启动路径所在的目录: vi /usr/local/apache-tomcat-7.0.55/bin/catalina.sh 加入以下信息: export JAVA_HOME=/usr/local/jdk1.7.0_67 export JRE_HOME=/usr/local/jdk1.7.0_67/jre

[转]Tomcat----Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

对于使用IDE开发的程序员来讲,并不是所有人都对自己用来吃饭的工具了如指掌.常在阴沟跑,哪能不翻船.为此我把自己使用Tomcat/Eclipse的一些经验教训整理了一下,会陆续的贴出来,也许会帮到和我遇到同样问题的人. 先讲一个Tomcat的问题.很多人兴冲冲的下载了一个Tomcat,跑到bin看到一个startup.bat就去执行,结果提示Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At leas

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 At least one of these environment variable is needed to run this program 原因:找不到jdk或者jre路径. 解决办法:在setclasspath.bat的开头声明环境变量,打开tomcat的bin目录下面的setclasspath.

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 definedAt least one of these environment variable is needed to run this program 我的tomcat以前是正常的,突然重启下tomcat时报了这个错,错误大致是环境变量不可用造成的, 在网上找了很久都是说要修改setclasspath.bat(该文件路

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

开启tomcat时出现以上错误 // 进入root帐户 在普通用户也可以 sudo -s //用编辑器打开.bashrc文件 gedit .bashrc 在普通用户下注意加上sudo //在最后一行添加环境变量(文件位置根据自己的实际情况) JAVA_HOME=/usr/local/java/jdk1.7.0_67CLASSPATH=.:/usr/local/java/jdk1.7.0_67/libJRE_HOME=/usr/local/java/jdk1.7.0_67/jrePATH=$PAT

Tomcat Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

一眼就能看出来是jdk的环境有问题,但是用了这么久的jdk一直都配置的好好的,怎么一到Tomcat上就这么矫情了. 最后查解决方案,原来是我的jdk从官网直接下载的,虽然我修改了java_home,但不太智能的tomcat仍然没有自动识别出java_home路径. linux解决方法:编辑文件 /usr/local/tomcat/bin/catalina.sh (根据你自己的jdk路径进行修改) 在文件的正文开头,即正式代码前,大概在99行添加如下代码 1 export JAVA_HOME=/u

添加tomcat开机启动服务时报错:Neither the JAVA_HOME nor the JRE_HOME enviromment variable is defined

首先,参考的 https://blog.csdn.net/wabil/article/details/78818249 的方式添加 tomcat 开机启动,这种方式不需要添加 setenv.sh 文件,轻量级,非常方便,具体方式如下: 1. 创建一个服务文件 vim /lib/systemd/system/tomcat.service 复制如下内容,修改后保存: [Unit]Description=tomcatAfter=network.target [Service]Type=oneshotE

windows tomcat 启动报错TOMCAT JAVA_HOME or JRE_HOME environment variable is not defined correctly

问题描述: TOMCAT JAVA_HOME or JRE_HOME environment variable is not defined correctly 报错信息如下: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;提示找不到java_home各jre