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_67
CLASSPATH=.:/usr/local/java/jdk1.7.0_67/lib
JRE_HOME=/usr/local/java/jdk1.7.0_67/jre
PATH=$PATH:/usr/local/java/jdk1.7.0_67/bin

//重启生效。

//给tomcat文件夹及所有文件赋予权限777

chmod 777 /opt/tomcat -R

//开启tomcat服务

/opt/tomcat/bin/startup.sh

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

时间: 2024-10-08 02:24:39

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的相关文章

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(该文件路

JRE_HOME environment variable is not defined correctly This environment variableis needed to run this program

已经安装了JDK1.7 和对应JRE 安装了tomcat8 都是解压版 并设置了JAVA_HOME.JRE_HOME 但Tomcat在启动过程中找不到 错误: the JRE_HOME environment variable is not defined correctly This environment variableis needed to run this program 原因: startup.ba脚本调用了catalina.bat 所以需要更改catalina.bat中这部分值为

Tomcat环境变量配置命令行报错:The JRE_HOME environment variable is not defined correctl This environment variable is needed to run this program

1. tomcat——>bin——>setclasspath.bat,使用记事本打开. 2. 添加如下代码即可: 为自己实际的环境变量配置为准!!! set JAVA_HOME=D:\IDEA\IDEA\jdk 具体如图: 3.详情解释 startup.bat里边实际调用了另一个批处理,就是setclasspath.bat这个文件,把这个文件以文本形式打开,里边其实写的就是寻找你配置的JAVA_HOME的路径 其中该部分为编辑位置(如图) 然后进行编辑,因为电脑本身找不到,为了让他找到就直接给

tomcat闪退无法启动 the catalina_home environment variable is not defined correctly this environment variable is needed to run this program

未成功配置CATALINA_HOME 1.计算机>属性>环境变量, 新建环境变量.变量名为CATALINA_HOME ,变量值tomcat的解压目录,注意后面不用多加"\"或者";" 2.在环境变量Path中,新增加"%TALINA_HOME%\bin\ " 3.启动tomcat :进入命令行cmd,输入startup.bat 问题插入--------------------------------------------------

接着第二个问题,The CATALINA_HOME environment variable is not defined correctly This environment variable is needed to run this program 请按任意键继续. . .

解决过程 找到环境变量 不是这个,启动无效 也不是这个 启动成功,正确路径是选到安装解压文件夹下的Tomcat文件夹 原文地址:https://www.cnblogs.com/32079nezha/p/11478860.html

[转]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.

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 definedAt least one of these environment variable is needed to run this program 解决方法: 找到tomcat 安装目录bin下的setclasspath.bat文件,打开后,新加如下配置: set JAVA_HOME=C:\Program Files\Java\j

Neither the JAVA_HOME nor the JRE_HOME错误解决

Tomcat安装配置: 双击安装到c盘后. 跑到C:\apache-tomcat-7.0.26\bin看到一个startup.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.好,再去下载个最新版本的JDK,Install完成之后却还是提