tomcat fleeting, Neither the JAVA_HOME or the JRE_HOME environmental variable is defi

2010-12-07  来源:本站原创  分类:Java  人气:133 

Look at the Tomcat's startup.bat, it calls the catalina.bat, and catalina.bat is called setclasspath.bat. As long as the beginning of a statement in setclasspath.bat environment variables, such as mine is:

Talk about a Tomcat issue. Many people excitedly downloaded a Tomcat, go to bin go see a startup.bat implementation, results suggest 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. Well, go download the most recent version of the JDK, Install completed but still prompted 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. Do a study on the Tomcat warm cold by half.

Later, due to a newer version of JDK (for example, I use JDK1.6) installation does not automatically register the environment variables JAVA_HOME, JRE_HOME. The environment in the unit as I and my users are restricted (PowerUser), set the environment variable is not convenient, so I found another method.

Look at the Tomcat's startup.bat, it calls the catalina.bat, and catalina.bat is called setclasspath.bat. As long as the beginning of a statement in setclasspath.bat environment variables, such as mine is:

As long as the beginning of a statement in setclasspath.bat environment variables, such as mine is:

rem ------------------------------------------------- --------------------------
rem Set CLASSPATH and Java options
rem
rem $ Id: setclasspath.bat 505241 2007-02-09 10:22:58 Z jfclere $
rem ------------------------------------------------- --------------------------

set JAVA_HOME = C: \ jdk6.0
set JRE_HOME = C: \ jre1.6.0

rem Make sure prerequisite environment variables are set
if not "% JAVA_HOME%" == "" goto gotJdkHome
if not "% JRE_HOME%" == "" goto gotJreHome
echo Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
echo At least one of these environment variable is needed to run this program
goto exit
......

So that when each run startup.bat registered JAVA_HOME, JRE_HOME. Console window is closed, the two variables will disappear and will not take up memory. Running about, and ultimately prompted the "information: Server startup in xxxxx ms" and you're done.

相关文章
  • tomcat fleeting, Neither the JAVA_HOME or the JRE_HOME environmental variable is defi 2010-12-07

    Look at the Tomcat's startup.bat, it calls the catalina.bat, and catalina.bat is called setclasspath.bat. As long as the beginning of a statement in setclasspath.bat environment variables, such as mine is: Talk about a Tomcat issue. Many people excit

  • Tomcat找不到JAVA_HOME与JRE_HOME的问题 2015-03-31

    有些情况下,Tomcat总是找不到JAVA_HOME,JRE_HOME.比如在centos上,我其实已经在/etc/profile文件中配置好了JAVA_HOME,JRE_HOME,但Tomcat总是找不到(Tomcat是绿色解压版本).或者在当前机器上可以启动tomcat,但通过ant构建工具运程操作Tomcat的启动与停止时又找不到JAVA_HOME,JRE_HOME. 为了解决这个问题,我们就给Tomcat手工指定具体的JAVA版本.我们只要编辑Tomcat目录下的 setclasspat

  • tomcat can not start under linux 2010-03-14

    Quote Error: 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 Look at the Tomcat's startup.bat, it calls the catalina.bat, and catalina.bat is called setcl

  • Tomcat installation under Linux 2010-07-03

    Tomcat installation under Linux 1, under the Tomcat6.0 on usr 2, configure the path, I use is to modify the prfile file If your computer only when used as a development of this method is recommended because all users are entitled to use the shell env

  • Ubuntu settings. Application and solve common problems (X) - Install jdk + tomcat + eclipse + mysql 2011-05-06

    A, jdk Typing the following command in the terminal to automatically download and install the jdk: sudo apt-get install sun-java6-jdk sun-java6-plugin (Note: If you are not a java developer, just install the FRE, the implementation of sudo apt-get in

  • tomcat在opensuse下开机自启失败的原因分析及解决方法 2014-06-13

    以下是对tomcat在opensuse下开机自启失败的原因分析及其解决方法进行了介绍,需要的朋友可以过来参考下 环境•opensuse 10.2 •tomcat 5.5 设置信息在/etc/init.d/boot.local中添加如下命令: /opt/tomcat/bin/startup.sh 错误描述opensuse启动完毕后,tomcat一直没启动. 分析1. 系统启动完毕后,手动启动tomcat可以成功,说明不是权限的问题. 2. 查找系统日志(/var/log/boot.msg),找到了

  • windows下直接点击startup.bat启动tomcat服务示例代码 2015-02-09

    已经安装了JDK1.5并设置好了JAVA_HOME,可偏偏Tomcat在启动过程中找不到下面为大家介绍下点击startup.bat启动tomcat服务的实现思路 在XP上明明已经安装了JDK1.5并设置好了JAVA_HOME,可偏偏Tomcat在启动过程中找不到. 报错信息如下:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment varia

  • win7 64位 安装tomcat的问题 2012-04-11

    1 tomcat 提示指定的服务未安装 unable to open 新下载的Tomcat6.0 解紧缩 完了运行tomcat6.exe屏幕一闪就没了 运行tomcat6w.exe弹出个筐 指定的做事并未以已安装的做事存在 Unable to open the Service 'tomcat6' 具体 安装行动 :打开下令 行提醒 符窗口 => 进入Tomcat安装目次 ==> 进入bin目次 下==> 输入:service.bat install 即可 2 执行安装后仍旧不好用 从to

  • ubuntu 安装tomcat 2013-10-15

    0.安装jdk,前面已经装过了: http://my.codeweblog.com/yale8848/blog/168864 1.下载tomcat6.0: http://tomcat.apache.org/download-60.cgi 2.创建tomcat目录,可以自定义: sudo mkdir /usr/tomcat cp apache-tomcat-6.0.37.tar.gz /usr/tomcat cd /usr/tomcat tar zxvf apache-tomcat-6.0.37.

  • CentOS5.4 install Tomcat6.0.18 full text records [original] 2010-04-08

    Last login: Thu Dec 10 19:04:29 2009 from 192.168.1.81 [Root @ CentOS ~] # cd / opt / soft / Tomcat / [Root @ CentOS Tomcat] # ls-l total 85972 -Rw-r - r - 1 root root 6142197 Apr 6 2009 apache-tomcat-6.0.18.tar.gz -Rw-r - r - 1 root root 81792634 No

  • Ubuntu Java development environment to build 2010-11-07

    Busy busy these days and windy project, the use of the weekend, you learn to Ubuntu System Java development environment to build it! I am using ubuntu-10.04-desktop-i386.iso, was established under the Window system installed on a virtual machine. The

  • tomcat to use https 2010-03-29

    This article is reproduced, if offended, you can notice I deleted. The outset, this article can be found in GOOGLE on this, so is the original, but not first. In this record, only memo. Has done an experiment to enable HTTPS in Tomcat 5.5 connections

  • linux install jdk and tomcat configuration 2010-03-18

    jdk's installed: Download jdk: jdk-6u13-linux-i586-rpm.bin, and use the rz command reached liunx in chmod command is very important for changing the file or directory access permissions. bin file extracting package equivalent to the green, directly a

  • Ubuntu installed JDK configure Tomcat service 2010-05-24

    1. First install JDK Install the jdk-6u13-linux-i586.bin version. First switch to the administrator account root @ bill021: / # sudo su Then go to the jdk installation directory are put directly to the Executive: root @ bill021: / # sh ./jdk-6u13-lin

  • Tomcat 7 of the JDK do not just need web.xm JRE and J2SE 6.0 and the true and lies? 2010-06-14

    Tomcat 7 of the JDK do not just need web.xm JRE and J2SE 6.0 and the true and lies? First, of course, is to determine what is true, eating reassurance first, not a lie:) Download the Tomcat 7 RC4, unzip to D: \ OpenSource \ Tomcat \ 7.0.0-RC4 directo

  • Configuring tomcat to run the environment 2010-08-09

    Question: Configuring tomcat to run today's environment when the below problem The CATALINA_HOME environment variable is not defined correctly This environment variable is needed to run this program Then added to the CATALINA_HOME environment variabl

  • Apache 2.2 + Tomcat 7.0 + jdk-6u23 + MySQL 5.1 + mod_jk + php 5.2.6 2010-12-24

    Apache 2.2 + Tomcat 7.0 + jdk-6u23 + MySQL 5.1 + mod_jk + php 5.2.6 1. [If the original server has JDK, you want to uninstall] Find old jdk command: rpm-qa | grep gcj Executive rpm-e - nodeps java-1.4.2-gcj-compat-1.4.2.0-40jpp.115 And enter the java

  • Linux, the installation of JDK and TOMCAT 2011-05-19

    Linux software installation and configuration 1. Install jdk1.6 Download jdk1.6 installation file jdk-6u10-linux-i586-rpm.bin; Application server in the foreground, the interface application server installed jdk and jre Using the root user login, the

  • Ubuntu is installed JDK configure Tomcat Service 2010-10-15

    Ubuntu is installed JDK configure Tomcat Service Ubuntu is installed JDK configure Tomcat Service 1, first install the JDK Installed jdk-6u17-linux-i586.bin version. First, switch to an administrator account root007 @ bill021: / # sudo su Then go to

  • tomcat configuration for the service to run automatically with the boot 2011-05-14

    tomcat server in windows do start to run automatically Free installation version of tomcat, to create environment variables that you have a JAVA_HOME variable is the JDK installation directory should be JRE_HOME variable is your JRE installation dire