从别的地方复制了一个tomcat, 启动后一闪即退, 使用记事本打开 startup.bat文件, 在文件底部修改, 并追加如下内容

call "%EXECUTABLE%" run %CMD_LINE_ARGS%    注意这里的run 本来是start 

:end 

pause        这个是没有的, 自己添加的, 为的就是将错误信息暴露出来

 

下面就是错误信息:

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的; 那就看起来不是环境变量的问题了

打开bin目录下的Catalina.bat文件, 在下面添加:

rem Copy CATALINA_BASE from CATALINA_HOME if not defined  红色的字是添加的

set JAVA_HOME=C:/Program Files (x86)/Java/jdk1.8.0_91
set JRE_HOME=C:/Program Files (x86)/Java/jdk1.8.0_91/jre if not "%CATALINA_BASE%" == "" goto gotBase
set "CATALINA_BASE=%CATALINA_HOME%"
:gotBase

然后重启即可; 如果是linux系统将set 使用  export 替换即可

解决JAVA_HOME nor the JRE_HOME environment variable is defined的更多相关文章

  1. Java项目启动时候报Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 解决办法

    今天在发布Java项目的时候又遇到    Neither the JAVA_HOME nor the JRE_HOME environment variable is defined  At leas ...

  2. linux安装tomcat Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

    这两天我们的开发机重启了好几次,发现每次重启后我的tomcat总是没有启动.检查java路径,配置正确,后来拿普通账号启动tomcat时报如下的错: Neither the JAVA_HOME nor ...

  3. CentOS Tomcat启动 Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

    链接:http://blog.csdn.net/shangdiyisi/article/details/9477521 [bravoinfo@bravoinfo-hk-01 apache-tomcat ...

  4. Jenkins启动Tomcat时提示Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

      Jenkins构建提示: [SSH] executing...Neither the JAVA_HOME nor the JRE_HOME environment variable is defi ...

  5. tomcat启动报错:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

      windows系统: 部署了一个Tomcat8.5.15,bin目录下startup.bat执行,结果提示Neither the JAVA_HOME nor the JRE_HOME enviro ...

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

    对于使用IDE开发的程序员来讲,并不是所有人都对自己用来吃饭的工具了如指掌.常在阴沟跑,哪能不翻船.为此我把自己使用Tomcat/Eclipse的一些经验教训整理了一下,会陆续的贴出来,也许会帮到和我 ...

  7. tomcat启动报错:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable

    linux 下 启动tomcat 报: Neither the JAVA_HOME nor the JRE_HOME environment variable is definedAt least o ...

  8. 启动tomcat 报错:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

    [root@localhost META-INF]# systemctl start tomcat Job for tomcat.service failed because the control ...

  9. 普通用户操作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项目适合出现这个信息,Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At ...

随机推荐

  1. mysql数据库优化课程---7、网站的搜索技术怎么选

    mysql数据库优化课程---7.网站的搜索技术怎么选 一.总结 一句话总结: 1.量很小(像小网站)---like2.量大一点()---标签3.量超级大(像百度)---搜索引擎 1.数据库中取一列比 ...

  2. 20165332实验一 Java开发环境的熟悉

    实验一 Java开发环境的熟悉 一.Java开发环境的熟悉-1 1.实验要求: 0 参考实验要求: 1 建立"自己学号exp1"的目录 : 2 在"自己学号exp1&qu ...

  3. STL标准容器特征

    一. vector vector类是一种顺序容器,可以看作动态数组,容器中的元素存放在连续存储区域. vector容器自动分配.释放.扩展.收缩存储空间,不需要使用new或delete关键字. vec ...

  4. 【spark】IDEA建立基于scala语言的spark项目

    1.新建一个Spark项目 2.选择maven,用模板创建项目 如果 没有这个模板,我们需要添加一个 我们这里使用的是1.6版本Archetype Group Id : net.alchim31.ma ...

  5. git pull VS git fetch&merge

    使用git fetch和git pull都可以更新远程仓库的代码到本地,但是它们之间还是有区别. git fetch  git fetch origin master git log -p maste ...

  6. 再读《Java编程思想 》

    前段时间在豆瓣上无意间看到一个帖子"我为什么把thinking in java 读了10遍",是11年的帖子,下面评论至今,各种声音都有,不过大多数还是佩服和支持的.我个人来讲也是 ...

  7. SVG 总结

    //文件名:11.svg<?xml version="1.0" encoding="UTF-8" ?> <!--XML NameSpace:名 ...

  8. (一)mvc与mvvm设计模式

    前沿:了解设计模式对我们而言,具有很大意义,对语言没有限制,它适用于任何语言,是一种变成思想.设计模式最初有四人帮提出,有兴趣的同学可以去了解下,今天给大家主要分析mvc与mvvm设计模式 一.mvc ...

  9. MySql必知必会实战练习(二)数据检索

    在上篇博客MySql必知必会实战练习(一)表创建和数据添加中完成了各表的创建和数据添加,下面进行数据检索和过滤操作. 1. Select子句使用顺序 select--->DISTINCT---& ...

  10. bzoj 1264 基因匹配

    Written with StackEdit. Description 卡卡昨天晚上做梦梦见他和可可来到了另外一个星球,这个星球上生物的\(DNA\)序列由无数种碱基排列而成(地球上只有\(4\)种) ...