`

The JAVA_HOME environment variable is not defined

阅读更多
启动命令如下:
login: sgqgweb
Password:
Last login: Wed Nov 11 07:37:43 from bogon
[sgqgweb@www ~]$ ls
???????系?button.swf    jakarta-tomcat-5.0.30.tgz  sgqgweb
Desktop                jdk1.5.0_06                sgqgweb.tar
jakarta-tomcat-5.0.30  jdk1.5.0_06.tgz            sgqgweb.tgz
[sgqgweb@www ~]$ cd jakar*
[sgqgweb@www jakarta-tomcat-5.0.30]$ ls
bin     conf     logs    RELEASE-NOTES  server   work
common  LICENSE  NOTICE  RUNNING.txt    webapps
[sgqgweb@www jakarta-tomcat-5.0.30]$ cd bin
[sgqgweb@www bin]$ ls
bootstrap.jar            setclasspath.bat
catalina.50.bat          setclasspath.sh
catalina.50.sh           shutdown.bat
catalina.bat             shutdown.sh
catalina.sh              shutdown-using-launcher.bat
catalina.xml             shutdown-using-launcher.sh
commons-daemon.jar       startup.bat
commons-launcher.jar     startup.sh
commons-logging-api.jar  startup-using-launcher.bat
contrib                  startup-using-launcher.sh
cpappend.bat             tomcat5.exe
digest.bat               tomcat5w.exe
digest.sh                tool-wrapper.bat
jmx.jar                  tool-wrapper.sh
jsvc.tar.gz              tool-wrapper-using-launcher.bat
LauncherBootstrap.class  tool-wrapper-using-launcher.sh
launcher.properties      version.bat
nohup.out                version.sh
service.bat
[sgqgweb@www bin]$ ./catalina.sh start
The JAVA_HOME environment variable is not defined
This environment variable is needed to run this program
[sgqgweb@www bin]$
报错如下:
The JAVA_HOME environment variable is not defined
This environment variable is needed to run this program
解决办法:
分享到:
评论

相关推荐

    tomcat常见的错误与解决方案小结

    问题1:The JAVA_HOME environment variable is not defined This environment variable is needed to run this program; 解决:没有在tomcat的配置文件.bash_profile中设置环境变量JAVA_HOME,具体设置方法为:...

    tomcat报错

    错误信息为:“The JAVA_HOME environment variable is not defined. This environment variable is needed to run this...NB: JAVA_HOME should point to a JDK not a JRE”。 从这段信息中我们可以明确几个关键点...

    Tomcat的配置及出现问题的解决方法

    在Tomcat启动时,可能会出现The JAVA_HOME environment variable is not defined correctly的错误信息。这是因为JAVA_HOME环境变量没有正确设置。需要检查JAVA_HOME环境变量是否正确设置。 2.Tomcat无法从“开始”...

    tomcat常见错误与解决方法.pdf

    在 Tomcat 服务器启动时,提示:“The JAVA_HOME environment variable is not defined This environment variable is needed to run this program”。该错误是因为在 Tomcat 配置文件 .bash_profile 中没有设置环境...

    安装 配置 同时运行2个tomcat

    确保正确设置了`JAVA_HOME`和`CATALINA_HOME`环境变量,否则会遇到错误提示,如“`The CATALINA_HOME environment variable is not defined correctly`”或“`The JAVA_HOME environment variable is not defined ...

    JAVA JDK和Tomcat环境变量配置

    当你写下improt java.util.*时,编译器面对import关键字时,知道你要引入java.util这个package中的类;但是编译器如何知道你把这个 package放在哪里了呢?所以你首先得告诉编译器这个package的所在位置;如何告诉它...

    tomcat集成jdk和mysql+开机启动.pdf

    echo The JAVA_HOME environment variable is not defined echo This environment variable is needed to run this program goto end :okHome set JAVA_HOME=%CATALINA_HOME%\jdk rem Set default Service...

    tomcat集成jdk和mysql+开机启动实用.pdf

    echo The JAVA_HOME environment variable is not defined echo This environment variable is needed to run this program goto end :okHome set JAVA_HOME=%CATALINA_HOME%\jdk if not "%CATALINA_BASE%" ==...

    双击startup.bat,启动不了tomcat

    用户尝试通过双击`startup.bat`脚本来启动Tomcat服务器时遇到了问题,系统提示“JAVA_HOME environment variable is not defined correctly”。此外,在命令行窗口中还出现了关于`CATALINA_HOME`未正确配置的警告。 ...

    JDK、TOMCAT、ECLIPSE配置

    - “The CATALINA_HOME environment variable is not defined correctly”:这通常意味着`CATALINA_HOME`未正确配置或指向错误的路径。 综上所述,正确配置JDK和Tomcat的环境变量对于搭建Java开发环境至关重要。...

    Tomcat配置

    - 如果未正确设置这些环境变量,可能会出现“The CATALINA_HOME environment variable is not defined correctly”的错误提示。 5. **启动失败问题**: - 如果启动Tomcat时遇到问题,首先检查日志文件(位于`logs...

    Linux实战总结

    - 错误示例:“Neither the JAVA_HOME nor the JRE_HOME environment variable is defined” 表明没有设置`JAVA_HOME`或`JRE_HOME`环境变量。 - 解决方法:手动设置`JAVA_HOME`环境变量,并确保路径正确。 ```...

    tomcat如何配置环境变量(修正版).pdf

    5. **CATALINA_HOME 或 JAVA_HOME 配置不当**:若出现类似 “The CATALINA_HOME environment variable is not defined correctly” 这样的错误提示,应重点检查这两个环境变量的配置是否正确无误。 ### 结论 正确...

    tomcat启动问题

    echo Neither the JAVA_HOME nor the JRE_HOME environment variable is defined echo At least one of these environment variables is needed to run this program goto exit ``` 这段代码检查了`JAVA_HOME`...

    linux下按照tomcat并部署web项目

    - **环境变量未正确设置**:如果在启动Tomcat时遇到错误提示“`The CATALINA_HOME environment variable is not defined correctly`”,则可能是因为`CATALINA_HOME`环境变量未正确设置或存在路径错误。确保按照上述...

    linux下tomcat6.0+oracle10G安装文档

    在安装配置过程中可能会遇到一些问题,例如“启动Tomcat时报错:The BASEDIR environment variable is not defined correctly”等。此类问题通常表明环境变量配置不正确或缺失。解决方法是检查`catalina.sh`中的环境...

Global site tag (gtag.js) - Google Analytics